]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
z80, gas: follow historical assemblers and allow "op A,x" and "op x"
authorH. Peter Anvin <hpa@zytor.com>
Fri, 24 Oct 2025 13:12:39 +0000 (15:12 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 24 Oct 2025 13:12:39 +0000 (15:12 +0200)
commitf861f82cd9f058ecbe8133fad950bf237a3c66d1
tree95ab75034a6acf69a5aa4e44eb0704ab86487c2a
parenta04b91a64199ba87ff07efb3b07c3d1ebeb2e8cf
z80, gas: follow historical assemblers and allow "op A,x" and "op x"

For arithmetic ops, Z80 syntax wants "op A,x" for ADD, ADC and SBC and
"op x" for SUB, AND, OR, XOR, and CP. Many historical assemblers
simply treat them orthogonally; allowing but not requiring the "A,"
operand for any of these operations. This is widely used in legacy
source code, and there is no reason not to.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
gas/config/tc-z80.c