PR 25469 bfd * archures.c: Add GBZ80 and Z80N machine values. * reloc.c: Add BFD_RELOC_Z80_16_BE. * coff-z80.c: Add support for new reloc. * coffcode.h: Add support for new machine values. * cpu-z80.c: Add support for new machine names. * elf32-z80.c: Add support for new reloc. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. binutils* readelf.c (get_machine_flags): Add support for Z80N machine number. gas * config/tc-z80.c: Add -gbz80 command line option to generate code for the GameBoy Z80. Add support for generating DWARF. * config/tc-z80.h: Add support for DWARF debug information generation. * doc/c-z80.texi: Document new command line option. * testsuite/gas/z80/gbz80_all.d: New file. * testsuite/gas/z80/gbz80_all.s: New file. * testsuite/gas/z80/z80.exp: Run the new tests. * testsuite/gas/z80/z80n_all.d: New file. * testsuite/gas/z80/z80n_all.s: New file. * testsuite/gas/z80/z80n_reloc.d: New file. include * coff/internal.h (R_IMM16BE): Define. * elf/z80.h (EF_Z80_MACH_Z80N): Define. (R_Z80_16_BE): New reloc. ld * emulparams/elf32z80.sh: Use z80 emulation. * emultempl/z80.em: Make generic to both COFF and ELF Z80 emulations. * emultempl/z80elf.em: Delete. * testsuite/ld-elf/pr22450.d: Expect to fail for the Z80. * testsuite/ld-elf/sec64k.exp: Fix Z80 assembly. * testsuite/ld-unique/pr21529.s: Avoid register name conflict. * testsuite/ld-unique/unique.s: Likewise. * testsuite/ld-unique/unique_empty.s: Likewise. * testsuite/ld-unique/unique_shared.s: Likewise. * testsuite/ld-unique/unique.d: Updated expected output. * testsuite/ld-z80/arch_z80n.d: New file. * testsuite/ld-z80/comb_arch_z80_z80n.d: New file. * testsuite/ld-z80/labels.s: Add more labels. * testsuite/ld-z80/relocs.s: Add more reloc tests. * testsuite/ld-z80/relocs_f_z80n.d: New file opcodes * z80-dis.c: Add support for GBZ80 opcodes.
87 lines
2.5 KiB
Makefile
87 lines
2.5 KiB
Makefile
#name: Z80N forward relocation
|
|
#as: -z80n --defsym Z80N=1
|
|
#source: relocs.s
|
|
#source: labels.s
|
|
#ld: -e 0 -Ttext 0x100 -Tdata 0x200
|
|
#objdump: -d
|
|
|
|
|
|
.*:[ ]+file format (coff|elf32)\-z80
|
|
|
|
|
|
.* \.text:
|
|
|
|
0+100 <.*>:
|
|
[ ]+100:[ ]+cd 7d 01[ ]+call 0x017d
|
|
[ ]+103:[ ]+c4 7e 01[ ]+call nz,0x017e
|
|
[ ]+106:[ ]+cc 7f 01[ ]+call z,0x017f
|
|
[ ]+109:[ ]+d4 80 01[ ]+call nc,0x0180
|
|
[ ]+10c:[ ]+dc 81 01[ ]+call c,0x0181
|
|
[ ]+10f:[ ]+e4 82 01[ ]+call po,0x0182
|
|
[ ]+112:[ ]+ec 83 01[ ]+call pe,0x0183
|
|
[ ]+115:[ ]+f4 84 01[ ]+call p,0x0184
|
|
[ ]+118:[ ]+fc 85 01[ ]+call m,0x0185
|
|
[ ]+11b:[ ]+c3 7d 01[ ]+jp 0x017d
|
|
[ ]+11e:[ ]+c2 7e 01[ ]+jp nz,0x017e
|
|
[ ]+121:[ ]+ca 7f 01[ ]+jp z,0x017f
|
|
[ ]+124:[ ]+d2 80 01[ ]+jp nc,0x0180
|
|
[ ]+127:[ ]+da 81 01[ ]+jp c,0x0181
|
|
[ ]+12a:[ ]+e2 82 01[ ]+jp po,0x0182
|
|
[ ]+12d:[ ]+ea 83 01[ ]+jp pe,0x0183
|
|
[ ]+130:[ ]+f2 84 01[ ]+jp p,0x0184
|
|
[ ]+133:[ ]+fa 85 01[ ]+jp m,0x0185
|
|
[ ]+136:[ ]+dd 6e 05[ ]+ld l,\(ix\+5\)
|
|
[ ]+139:[ ]+dd 7e 03[ ]+ld a,\(ix\+3\)
|
|
[ ]+13c:[ ]+dd 4e fa[ ]+ld c,\(ix\-6\)
|
|
[ ]+13f:[ ]+dd 46 f9[ ]+ld b,\(ix\-7\)
|
|
[ ]+142:[ ]+fd 75 fb[ ]+ld \(iy\-5\),l
|
|
[ ]+145:[ ]+fd 77 03[ ]+ld \(iy\+3\),a
|
|
[ ]+148:[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183:[ ]+7e[ ]+ld a,\(hl\)
|
|
|
|
0+184 <label8>:
|
|
[ ]+184:[ ]+7f[ ]+ld a,a
|
|
|
|
0+185 <label9>:
|
|
[ ]+185:[ ]+2f[ ]+cpl
|
|
#pass
|