]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas: pru: Fix trailing whitespace handling
authorDimitar Dimitrov <dimitar@dinux.eu>
Mon, 12 Aug 2024 19:25:57 +0000 (22:25 +0300)
committerDimitar Dimitrov <dimitar@dinux.eu>
Thu, 15 Aug 2024 15:14:42 +0000 (18:14 +0300)
commit5c8f918639f1df77599c50fddfdfe23a2e3cbf35
treeb40ed7f0d06dd8f8c6be613cfbdd1b791400acd6
parenta6f8fe0a9e9cbe871652e46ba7c22d5e9fb86208
gas: pru: Fix trailing whitespace handling

With commit 6ae8a30d44f016cafb46a75843b5109316eb1996, arguments followed
by a C-style comment ended up with a trailing space.  That extra space
character confused the PRU register name matching, leading to spurious
errors about unrecognized registers.  This affected existing code like
newlib's setjmp.s for pru.

Fix by stripping the trailing whitespace for any argument.

Even with 6ae8a30d44f016cafb46a75843b5109316eb1996 reverted, this patch
is safe to be applied.

Successfully regression-tested with GCC and newlib testsuites for pru-unknown-elf.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
gas/config/tc-pru.c
gas/testsuite/gas/pru/pr32073.d [new file with mode: 0644]
gas/testsuite/gas/pru/pr32073.s [new file with mode: 0644]