diff options
author | Arnold Metselaar <arnold.metselaar@planet.nl> | 2008-09-14 05:40:09 +0000 |
---|---|---|
committer | Arnold Metselaar <arnold.metselaar@planet.nl> | 2008-09-14 05:40:09 +0000 |
commit | 2cf402d663ace8b31cb956fc4e9cd0bd1e565774 (patch) | |
tree | 9cc402c5abf050e8cc24950ced78fa69c26ea664 /gas | |
parent | 353ee11d7535917794f118d75fd8e099237850ef (diff) | |
download | gdb-2cf402d663ace8b31cb956fc4e9cd0bd1e565774.zip gdb-2cf402d663ace8b31cb956fc4e9cd0bd1e565774.tar.gz gdb-2cf402d663ace8b31cb956fc4e9cd0bd1e565774.tar.bz2 |
Fix Opcode generation of ld a,(bc) and ld a,(de) on target z80
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-z80.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 284e4a8..82ffb6b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2008-09-14 Chris Smith <chris@zxdesign.info> + + * config/tc-z80.c: Opcode generation of ld a,(bc) and ld a,(de) was + broken, as the opcode of ld a,(de) was being emitted for both. + 2008-09-12 Sterling Augustine <sterling@tensilica.com> * config/tc-xtensa.c (init_op_placement_info_table): Allow number of diff --git a/gas/config/tc-z80.c b/gas/config/tc-z80.c index 89a4603..825d920 100644 --- a/gas/config/tc-z80.c +++ b/gas/config/tc-z80.c @@ -1471,7 +1471,7 @@ emit_ldreg (int dest, expressionS * src) && (src->X_add_number == REG_BC || src->X_add_number == REG_DE)) { q = frag_more (1); - *q = 0x0A + ((dest & 1) << 4); + *q = 0x0A + ((src->X_add_number & 1) << 4); break; } |