diff options
author | Sergey Belyashov <sergey.belyashov@gmail.com> | 2020-03-03 16:31:42 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-03-03 16:32:52 +0000 |
commit | b8ba13856360d1cae00269a0ffe291cf573bb575 (patch) | |
tree | 8ea4c0ca398549d57965783aff7cb2aab9ffbbd3 /gas | |
parent | 7b973adce2b486518d3150db257b179e1b9a5d33 (diff) | |
download | gdb-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')
-rw-r--r-- | gas/ChangeLog | 10 | ||||
-rw-r--r-- | gas/config/tc-z80.c | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/ez80_adl_all.d | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/ez80_adl_all.s | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/ez80_z80_all.d | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/ez80_z80_all.s | 12 |
6 files changed, 54 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 835383c..9360e8d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,13 @@ +2020-03-03 Sergey Belyashov <sergey.belyashov@gmail.com> + + PR 25627 + * 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. + 2020-03-03 H.J. Lu <hongjiu.lu@intel.com> PR gas/25622 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 (); } diff --git a/gas/testsuite/gas/z80/ez80_adl_all.d b/gas/testsuite/gas/z80/ez80_adl_all.d index 45793ac..1ed35d2 100644 --- a/gas/testsuite/gas/z80/ez80_adl_all.d +++ b/gas/testsuite/gas/z80/ez80_adl_all.d @@ -959,3 +959,13 @@ Disassembly of section .text: \s+7c1:\s+ab\s+xor a,e \s+7c2:\s+ac\s+xor a,h \s+7c3:\s+ad\s+xor a,l +\s+7c4:\s+ed 07\s+ld bc,\(hl\) +\s+7c6:\s+ed 17\s+ld de,\(hl\) +\s+7c8:\s+ed 27\s+ld hl,\(hl\) +\s+7ca:\s+ed 37\s+ld ix,\(hl\) +\s+7cc:\s+ed 31\s+ld iy,\(hl\) +\s+7ce:\s+ed 0f\s+ld \(hl\),bc +\s+7d0:\s+ed 1f\s+ld \(hl\),de +\s+7d2:\s+ed 2f\s+ld \(hl\),hl +\s+7d4:\s+ed 3f\s+ld \(hl\),ix +\s+7d6:\s+ed 3e\s+ld \(hl\),iy diff --git a/gas/testsuite/gas/z80/ez80_adl_all.s b/gas/testsuite/gas/z80/ez80_adl_all.s index 2a895b1..041c10c 100644 --- a/gas/testsuite/gas/z80/ez80_adl_all.s +++ b/gas/testsuite/gas/z80/ez80_adl_all.s @@ -480,7 +480,7 @@ ex (sp),hl ex (sp),ix ex (sp),iy - ex af,af' + ex af,af' ;' ex de,hl exx halt @@ -998,3 +998,13 @@ xor e xor h xor l + ld bc,(hl) + ld de,(hl) + ld hl,(hl) + ld ix,(hl) + ld iy,(hl) + ld (hl),bc + ld (hl),de + ld (hl),hl + ld (hl),ix + ld (hl),iy diff --git a/gas/testsuite/gas/z80/ez80_z80_all.d b/gas/testsuite/gas/z80/ez80_z80_all.d index ce69d25..1f9a6f1 100644 --- a/gas/testsuite/gas/z80/ez80_z80_all.d +++ b/gas/testsuite/gas/z80/ez80_z80_all.d @@ -955,3 +955,13 @@ Disassembly of section .text: \s+793:\s+ab\s+xor a,e \s+794:\s+ac\s+xor a,h \s+795:\s+ad\s+xor a,l +\s+796:\s+ed 07\s+ld bc,\(hl\) +\s+798:\s+ed 17\s+ld de,\(hl\) +\s+79a:\s+ed 27\s+ld hl,\(hl\) +\s+79c:\s+ed 37\s+ld ix,\(hl\) +\s+79e:\s+ed 31\s+ld iy,\(hl\) +\s+7a0:\s+ed 0f\s+ld \(hl\),bc +\s+7a2:\s+ed 1f\s+ld \(hl\),de +\s+7a4:\s+ed 2f\s+ld \(hl\),hl +\s+7a6:\s+ed 3f\s+ld \(hl\),ix +\s+7a8:\s+ed 3e\s+ld \(hl\),iy diff --git a/gas/testsuite/gas/z80/ez80_z80_all.s b/gas/testsuite/gas/z80/ez80_z80_all.s index 76992c7..d2c6cdb 100644 --- a/gas/testsuite/gas/z80/ez80_z80_all.s +++ b/gas/testsuite/gas/z80/ez80_z80_all.s @@ -474,7 +474,7 @@ ex (sp),hl ex (sp),ix ex (sp),iy - ex af,af' + ex af,af' ;' ex de,hl exx halt @@ -992,3 +992,13 @@ xor e xor h xor l + ld bc,(hl) + ld de,(hl) + ld hl,(hl) + ld ix,(hl) + ld iy,(hl) + ld (hl),bc + ld (hl),de + ld (hl),hl + ld (hl),ix + ld (hl),iy |