https://sourceware.org/bugzilla/show_bug.cgi?id=34558
--- Comment #3 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Vineet Gupta <[email protected]>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c8b5c0f50e2e909296e601525808ab735862bcc2 commit c8b5c0f50e2e909296e601525808ab735862bcc2 Author: Vineet Gupta <[email protected]> Date: Thu Sep 10 09:14:22 2026 +0530 bpf: use %t after the remaining mnemonics in the opcode table The PR gas/34558 fix introduced %t and used it after `goto', the only mnemonic involved in that bug. Every other literal mnemonic in the table has the same latent problem, and it will bite the next time an instruction is added whose mnemonic extends an existing one. Convert the remaining 65 sites: `if', `lock', `gotol', `call', `callx', `may_goto', `le16'/`le32'/`le64', `be16'/`be32'/`be64' and `bswap16'/`bswap32'/`bswap64'. Only mnemonics get %t. A %w that follows an operand tag stays a %w: the operand parsers already reject input that runs a register or an immediate into the next token, and a tag such as %i32 merely happens to end in a name character, so treating it as a boundary would reject `if r1 == 5goto+1', which the pseudo-C dialect's flexible spacing accepts. Converting `lock' also needs %t to stop treating '*' as a mnemonic character, or `lock*(u64 *) (r1 + 0) += r2' would no longer assemble. This does tighten two cases that assembled before the PR gas/34558 fix, `ifr1>r2 goto+1' and `callxr1', both of which run a mnemonic into its first operand with no separating white space. gas/ * config/tc-bpf.c (md_assemble): Do not let '*' end a mnemonic for %t. * testsuite/gas/bpf/spacing-pseudoc.s: Cover mnemonics followed by an operand that cannot extend them. * testsuite/gas/bpf/spacing-pseudoc.d: Likewise. * testsuite/gas/bpf/spacing-mnemonic-pseudoc.s: New test. * testsuite/gas/bpf/spacing-mnemonic-pseudoc.d: New test. * testsuite/gas/bpf/spacing-mnemonic-pseudoc.l: New test. * testsuite/gas/bpf/bpf.exp: Run it. opcodes/ * bpf-opc.c (bpf_opcodes): Use %t rather than %w after the remaining literal mnemonic text. Signed-off-by: Vineet Gupta <[email protected]> -- You are receiving this mail because: You are on the CC list for the bug.
