+2021-05-10 Sergey Belyashov <sergey.belyashov@gmail.com>
+
+ PR 27415
+ * config/tc-z80.c (emit_data_val): Add support for 8-bit and
+ 24-bit shifts.
+ * testsuite/gas/z80/z80_reloc.a: Update tests.
+ * testsuite/gas/z80/z80_reloc.d: Update expected disassembly.
+
2021-05-08 Mike Frysinger <vapier@gentoo.org>
* doc/Makefile.am (html-local, as/index.html): New targets.
{
case 0: r_type = BFD_RELOC_Z80_WORD0; break;
case 16: r_type = BFD_RELOC_Z80_WORD1; break;
+ case 8:
+ case 24: /* add two byte fixups */
+ val->X_op = O_symbol;
+ val->X_op_symbol = NULL;
+ val->X_add_number = 0;
+ if (shift == 8)
+ {
+ fix_new_exp (frag_now, p++ - frag_now->fr_literal, 1, val, false,
+ BFD_RELOC_Z80_BYTE1);
+ /* prepare to next byte */
+ r_type = BFD_RELOC_Z80_BYTE2;
+ }
+ else
+ r_type = BFD_RELOC_Z80_BYTE3; /* high byte will be 0 */
+ size = 1;
+ simplify = false;
+ break;
default: simplify = false;
}
}
0000002a[ ]+r_byte1[ ]+data16
0000002b[ ]+r_word0[ ]+data32
0000002d[ ]+r_word1[ ]+data32
+0000002f[ ]+r_byte3[ ]+data32
+00000031[ ]+r_byte1[ ]+data24
+00000032[ ]+r_byte2[ ]+data24
+00000033[ ]+r_byte1[ ]+data32
+00000034[ ]+r_byte2[ ]+data32
#pass
.L_label:
.db data8
.dw data16
- .d24 data24
- .d32 data32
+ .d24 data24
+ .d32 data32
.db data16 & 0xff
.db data16 >> 8
.dw data32 & 0xffff
.dw data32 >> 16
+ .dw data32 >> 24
+ .dw data24 >> 8
+ .dw data32 >> 8
.end