aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorSergey Belyashov <sergey.belyashov@gmail.com>2020-03-03 16:31:42 +0000
committerNick Clifton <nickc@redhat.com>2020-03-03 16:32:52 +0000
commitb8ba13856360d1cae00269a0ffe291cf573bb575 (patch)
tree8ea4c0ca398549d57965783aff7cb2aab9ffbbd3 /gas/config
parent7b973adce2b486518d3150db257b179e1b9a5d33 (diff)
downloadgdb-b8ba13856360d1cae00269a0ffe291cf573bb575.zip
gdb-b8ba13856360d1cae00269a0ffe291cf573bb575.tar.gz
gdb-b8ba13856360d1cae00269a0ffe291cf573bb575.tar.bz2
The patch fixed invalid compilation of instruction LD IY,(HL) and disassemble of this and LD (HL),IX instruction. Also it update testsuit.
PR 25627 opcodes * z80-dis.c: Fix disassembly of LD IY,(HL) and D (HL),IX instructions. gas * config/tc-z80.c (emit_ld_rr_m): Fix invalid compilation of instruction LD IY,(HL). * testsuite/gas/z80/ez80_adl_all.d: Update expected disassembly. * testsuite/gas/z80/ez80_adl_all.s: Add tests of the instruction. * testsuite/gas/z80/ez80_z80_all.d: Update expected disassembly. * testsuite/gas/z80/ez80_z80_all.s: Add tests of the instruction.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-z80.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gas/config/tc-z80.c b/gas/config/tc-z80.c
index 312a0fc..713176f 100644
--- a/gas/config/tc-z80.c
+++ b/gas/config/tc-z80.c
@@ -2601,8 +2601,8 @@ emit_ld_rr_m (expressionS *dst, expressionS *src)
case REG_BC: opcode = 0x07; break;
case REG_DE: opcode = 0x17; break;
case REG_HL: opcode = 0x27; break;
- case REG_IX: opcode = (!prefix || prefix == 0xDD) ? 0x37 : 0x31; break;
- case REG_IY: opcode = prefix ? ((prefix == 0xDD) ? 0x31 : 0x37) : 0x36; break;
+ case REG_IX: opcode = (prefix == 0xED || prefix == 0xDD) ? 0x37 : 0x31; break;
+ case REG_IY: opcode = (prefix == 0xED || prefix == 0xDD) ? 0x31 : 0x37; break;
default:
ill_op ();
}