mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-12 12:16:04 +08:00
9fc0b501af
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.
93 lines
1.4 KiB
ArmAsm
93 lines
1.4 KiB
ArmAsm
.text
|
|
; .org 0
|
|
|
|
.globl label1
|
|
.globl label2
|
|
.globl label3
|
|
.globl label4
|
|
.globl label5
|
|
.globl label6
|
|
.globl label7
|
|
.globl label8
|
|
.globl label9
|
|
|
|
.globl value8
|
|
.globl value8_1
|
|
.globl value8_2
|
|
.globl value8_3
|
|
.globl value16
|
|
.globl value24
|
|
.globl value32
|
|
|
|
.globl field_0
|
|
.globl field_1
|
|
|
|
call label1
|
|
call nz,label2
|
|
call z,label3
|
|
call nc,label4
|
|
call c,label5
|
|
call po,label6
|
|
call pe,label7
|
|
call p,label8
|
|
call m,label9
|
|
|
|
jp label1
|
|
jp nz,label2
|
|
jp z,label3
|
|
jp nc,label4
|
|
jp c,label5
|
|
jp po,label6
|
|
jp pe,label7
|
|
jp p,label8
|
|
jp m,label9
|
|
|
|
ld l,(ix+5)
|
|
ld a,(ix+field_0)
|
|
ld c,(ix+field_1-10)
|
|
ld b,(ix+field_1-11)
|
|
|
|
field_0_1 .equ field_0+90
|
|
|
|
ld (iy-5),l
|
|
ld (iy+field_0),a
|
|
ld (iy+field_1+10),c
|
|
ld (iy+field_1+11),b
|
|
ld h,(iy+field_0_1)
|
|
|
|
.ifdef ADLMODE
|
|
ld.is de,value32 >> 16
|
|
ld.is hl,value32 & 0xffff
|
|
ld.is de,(value32 + 0x12345678) >> 16
|
|
ld.is hl,(value32 + 0x12345678) & 0xffff
|
|
.else
|
|
ld de,value32 >> 16
|
|
ld hl,value32 & 0xffff
|
|
ld de,(value32 + 0x12345678) >> 16
|
|
ld hl,(value32 + 0x12345678) & 0xffff
|
|
.endif
|
|
|
|
ld d,value32 >> 24
|
|
ld e,value32 >> 16
|
|
ld h,value32 >> 8
|
|
ld l,value32 >> 0
|
|
|
|
ld d,(value32 + 0x12345678) >> 24
|
|
ld e,(value32 + 0x12345678) >> 16
|
|
ld h,(value32 + 0x12345678) >> 8
|
|
ld l,(value32 + 0x12345678) >> 0
|
|
|
|
.ifdef Z80N
|
|
push label1
|
|
push value16
|
|
nextreg value8_1,value8_2
|
|
nextreg value8_3,a
|
|
ld a,a
|
|
.endif
|
|
|
|
.data
|
|
.db value8
|
|
.dw value16
|
|
.d24 value24
|
|
.d32 value32
|