]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas: accept leading zeros on dollar local labels in z80 sdcc compat mode
authorAaron Griffith <aargri@gmail.com>
Mon, 14 Jul 2025 08:38:52 +0000 (10:38 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 14 Jul 2025 08:38:52 +0000 (10:38 +0200)
commit804ccd0a649249bb97d1ac7e09af08ffbf743e44
tree59cd8768d03e83d3b6fb63807a0683e6da180560
parent939eb467b21de5d18ee703755fb9704a525cfe21
gas: accept leading zeros on dollar local labels in z80 sdcc compat mode

SDCC assembly output uses 5-digit numeric dollar sign labels, padded
with zeros. Commit 226749d made these invalid, and broke the Z80 SDCC
compatibility mode in GAS.

https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b

This restores SDCC compatibility by replacing the leading zeros with
spaces when inside dollar local labels and when SDCC compatibility is
enabled. It also restores the SDCC test case to represent actual
syntax emitted by SDCC, and adds a note explaining the purpose of
the test.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33030
gas/config/tc-z80.c
gas/testsuite/gas/z80/sdcc.s