6927f98292
Add option to offset S12 addresses into XGATE memory space. Tweak target flags to match other tools. (i.e. -m m68hc11). * doc/as.texinfo: Mention new options. * doc/c-m68hc11.texi: Document new options. * NEWS: Mention new support. * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * gas/m68hc11/insns9s12x.s: New * gas/m68hc11/insns9s12x.d: New * gas/m68hc11/hexprefix.s: New * gas/m68hc11/hexprefix.d: New * gas/m68hc11/9s12x-exg-sex-tfr.s: New * gas/m68hc11/9s12x-exg-sex-tfr.d: New * gas/m68hc11/insns9s12xg.s: New * gas/m68hc11/insns9s12xg.d: New * gas/m68hc11/9s12x-mov.s: New * gas/m68hc11/9s12x-mov.d: New * gas/m68hc11/m68hc11.exp: Updated * gas/m68hc11/*.d: Brought in line with changed objdump output. * gas/all/gas.exp: XFAIL all hc11/12 targets for redef2,3. * gas/elf/elf.exp: XFAIL all hc11/12 targets for redef. * gas/elf/dwarf2-1.d: Skip for hc11/12 targets. * gas/elf/dwarf2-2.d: Likewise. * ld-m68hc11/xgate-link.s: New. * ld-m68hc11/xgate-link.d: New. * ld-m68hc11/xgate-offset.s: New. * ld-m68hc11/xgate-offset.d: New. * ld-m68hc11/xgate1.s: New. * ld-m68hc11/xgate1.d: New. * ld-m68hc11/xgate2.s: New. * ld-m68hc11/m68hc11.exp: Updated. * ld-m68hc11/*.d: Brought in line with changed objdump output. * ld-gc/gc.exp: Update CFLAGS for m68hc11. * ld-plugin/plugin.exp: Likewise. * ld-srec/srec.exp: XFAIL for m68hc11 and m68hc12. * configure.in: Add S12X and XGATE co-processor support to m68hc11 target. * disassemble.c: Likewise. * configure: Regenerate. * m68hc11-dis.c: Make objdump output more consistent, use hex instead of decimal and use 0x prefix for hex. * m68hc11-opc.c: Add S12X and XGATE opcodes. * dis-asm.h (print_insn_m9s12x): Prototype. (print_insn_m9s12xg): Prototype. * m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10) R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations. (E_M68HC11_XGATE_RAMOFFSET): Define. * m68hc11.h: Add XGate definitions. (struct m68hc11_opcode): Add xg_mask field.
55 lines
2.1 KiB
Makefile
55 lines
2.1 KiB
Makefile
#source: far-hc12.s
|
|
#as: -m68hc12
|
|
#ld: -m m68hc12elf --script $srcdir/$subdir/far-hc12.ld
|
|
#objdump: -d --prefix-addresses -r
|
|
|
|
.*: file format elf32\-m68hc12
|
|
|
|
Disassembly of section .text:
|
|
0+c000 <tramp\._far_foo> ldy \#0x0+8000 <__bank_start>
|
|
0+c003 <tramp\._far_foo\+0x3> call 0x0+c049 <__far_trampoline> \{0x0+c049 <__far_trampoline>, 0x1\}
|
|
0+c007 <tramp\._far_bar> ldy \#0x0+8000 <__bank_start>
|
|
0+c00a <tramp\._far_bar\+0x3> call 0x0+c049 <__far_trampoline> \{0x0+c049 <__far_trampoline>, 0x0\}
|
|
0+c00e <_start> lds \#0x0+2063 <stack-0x1>
|
|
0+c011 <_start\+0x3> ldx \#0x0+abcd <__bank_start\+0x2bcd>
|
|
0+c014 <_start\+0x6> pshx
|
|
0+c015 <_start\+0x7> ldd \#0x0+1234 <stack\-0xe30>
|
|
0+c018 <_start\+0xa> ldx \#0x0+5678 <__bank_size\+0x1678>
|
|
0+c01b <_start\+0xd> jsr 0x0+c007 <tramp._far_bar>
|
|
0+c01e <_start\+0x10> cpx \#0x0+1234 <stack\-0xe30>
|
|
0+c021 <_start\+0x13> bne 0x0+c043 <fail>
|
|
0+c023 <_start\+0x15> cpd \#0x0+5678 <__bank_size\+0x1678>
|
|
0+c026 <_start\+0x18> bne 0x0+c043 <fail>
|
|
0+c028 <_start\+0x1a> pulx
|
|
0+c029 <_start\+0x1b> cpx \#0x0+abcd <__bank_start\+0x2bcd>
|
|
0+c02c <_start\+0x1e> bne 0x0+c043 <fail>
|
|
0+c02e <_start\+0x20> ldd \#0x0+c000 <tramp._far_foo>
|
|
0+c031 <_start\+0x23> xgdx
|
|
0+c033 <_start\+0x25> jsr 0x0,X
|
|
0+c035 <_start\+0x27> ldd \#0x0+c007 <tramp._far_bar>
|
|
0+c038 <_start\+0x2a> xgdy
|
|
0+c03a <_start\+0x2c> jsr 0x0,Y
|
|
0+c03c <_start\+0x2e> call 0x0+18000 <_far_no_tramp> \{0x0+8000 <__bank_start>, 0x2\}
|
|
0+c040 <_start\+0x32> clra
|
|
0+c041 <_start\+0x33> clrb
|
|
0+c042 <_start\+0x34> wai
|
|
0+c043 <fail> ldd \#0x0+1 <stack\-0x2063>
|
|
0+c046 <fail\+0x3> wai
|
|
0+c047 <fail\+0x4> bra 0x0+c00e <_start>
|
|
0+c049 <__far_trampoline> movb 0x0,SP, 0x2,SP
|
|
0+c04d <__far_trampoline\+0x4> leas 0x2,SP
|
|
0+c04f <__far_trampoline\+0x6> jmp 0x0,Y
|
|
Disassembly of section .bank1:
|
|
0+10+ <_far_bar> jsr 0x0+10006 <local_bank1>
|
|
0+10003 <_far_bar\+0x3> xgdx
|
|
0+10005 <_far_bar\+0x5> rtc
|
|
0+10006 <local_bank1> rts
|
|
Disassembly of section .bank2:
|
|
0+14000 <_far_foo> jsr 0x0+14004 <local_bank2>
|
|
0+14003 <_far_foo\+0x3> rtc
|
|
0+14004 <local_bank2> rts
|
|
Disassembly of section .bank3:
|
|
0+18000 <_far_no_tramp> jsr 0x0+18004 <local_bank3>
|
|
0+18003 <_far_no_tramp\+0x3> rtc
|
|
0+18004 <local_bank3> rts
|