* config/tc-m68hc11.c: Add S12X and XGATE co-processor support.
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.
This commit is contained in:
parent
8f55341ea1
commit
c846faf01a
|
@ -1,3 +1,8 @@
|
|||
2012-05-15 James Murray <jsm@jsm-net.demon.co.uk>
|
||||
|
||||
* dis-asm.h (print_insn_m9s12x): Prototype.
|
||||
(print_insn_m9s12xg): Prototype.
|
||||
|
||||
2012-05-03 Sean Keys <skeys@ipdatasys.com>
|
||||
|
||||
* dis-asm.h (print_insn_xgate): Define.
|
||||
|
|
|
@ -260,6 +260,8 @@ extern int print_insn_m32c (bfd_vma, disassemble_info *);
|
|||
extern int print_insn_m32r (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_m68hc11 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_m68hc12 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_m9s12x (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_m9s12xg (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_m68k (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_m88k (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_mcore (bfd_vma, disassemble_info *);
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2012-05-15 James Murray <jsm@jsm-net.demon.co.uk>
|
||||
|
||||
* 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.
|
||||
|
||||
2012-05-14 James Lemke <jwlemke@codesourcery.com>
|
||||
* ppc.h (SEC_PPC_VLE): Remove.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* m68hc11 & m68hc12 ELF support for BFD.
|
||||
Copyright 1999, 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
|
||||
Copyright 1999, 2000, 2001, 2002, 2010, 2012 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
|
@ -42,6 +42,12 @@ START_RELOC_NUMBERS (elf_m68hc11_reloc_type)
|
|||
RELOC_NUMBER (R_M68HC11_LO16, 12)
|
||||
RELOC_NUMBER (R_M68HC11_PAGE, 13)
|
||||
|
||||
RELOC_NUMBER (R_M68HC12_16B, 15)
|
||||
RELOC_NUMBER (R_M68HC12_PCREL_9, 16)
|
||||
RELOC_NUMBER (R_M68HC12_PCREL_10, 17)
|
||||
RELOC_NUMBER (R_M68HC12_HI8XG, 18)
|
||||
RELOC_NUMBER (R_M68HC12_LO8XG, 19)
|
||||
|
||||
/* GNU extension for linker relaxation.
|
||||
Mark beginning of a jump instruction (any form). */
|
||||
RELOC_NUMBER (R_M68HC11_RL_JUMP, 20)
|
||||
|
@ -64,6 +70,9 @@ END_RELOC_NUMBERS (R_M68HC11_max)
|
|||
/* Uses 68HC12 memory banks. */
|
||||
#define E_M68HC12_BANKS 0x000000004
|
||||
|
||||
/* XGATE ram offsetting. */
|
||||
#define E_M68HC11_XGATE_RAMOFFSET 0x000000100
|
||||
|
||||
#define EF_M68HC11_MACH_MASK 0xF0
|
||||
#define EF_M68HC11_GENERIC 0x00 /* Generic 68HC12/backward compatibility. */
|
||||
#define EF_M68HC12_MACH 0x10 /* 68HC12 microcontroller. */
|
||||
|
@ -86,10 +95,10 @@ END_RELOC_NUMBERS (R_M68HC11_max)
|
|||
/* Special values for the st_other field in the symbol table. These
|
||||
are used for 68HC12 to identify far functions (must be called with
|
||||
'call' and returns with 'rtc'). */
|
||||
#define STO_M68HC12_FAR 0x80
|
||||
#define STO_M68HC12_FAR 0x80
|
||||
|
||||
/* Identify interrupt handlers. This is used by the debugger to
|
||||
correctly compute the stack frame. */
|
||||
#define STO_M68HC12_INTERRUPT 0x40
|
||||
#define STO_M68HC12_INTERRUPT 0x40
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2012-05-15 James Murray <jsm@jsm-net.demon.co.uk>
|
||||
|
||||
* m68hc11.h: Add XGate definitions.
|
||||
(struct m68hc11_opcode): Add xg_mask field.
|
||||
|
||||
2012-05-14 Catherine Moore <clm@codesourcery.com>
|
||||
Maciej W. Rozycki <macro@codesourcery.com>
|
||||
Rhonda Wittels <rhonda@codesourcery.com>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* m68hc11.h -- Header file for Motorola 68HC11 & 68HC12 opcode table
|
||||
Copyright 1999, 2000, 2002, 2003, 2010 Free Software Foundation, Inc.
|
||||
Copyright 1999, 2000, 2002, 2003, 2010, 2012
|
||||
Free Software Foundation, Inc.
|
||||
Written by Stephane Carrez (stcarrez@nerim.fr)
|
||||
|
||||
This file is part of GDB, GAS, and the GNU binutils.
|
||||
|
@ -37,8 +38,7 @@
|
|||
of the M6811_INIT register. At init time, the I/O registers are
|
||||
mapped at 0x1000. Address of registers is then:
|
||||
|
||||
0x1000 + M6811_xxx
|
||||
*/
|
||||
0x1000 + M6811_xxx. */
|
||||
#define M6811_PORTA 0x00 /* Port A register */
|
||||
#define M6811__RES1 0x01 /* Unused/Reserved */
|
||||
#define M6811_PIOC 0x02 /* Parallel I/O Control register */
|
||||
|
@ -364,6 +364,26 @@
|
|||
#define M6812_INDEXED 0x20000000 /* n,r n = 5, 9 or 16-bits */
|
||||
#define M6812_OP_IDX_P2 0x40000000
|
||||
|
||||
/* XGATE defines.
|
||||
These overlap with HC11/12 as above but not used at the same time. */
|
||||
#define M68XG_OP_NONE 0x0001
|
||||
#define M68XG_OP_IMM3 0x0002
|
||||
#define M68XG_OP_R 0x0004
|
||||
#define M68XG_OP_R_R 0x0008
|
||||
#define M68XG_OP_R_IMM4 0x0010
|
||||
#define M68XG_OP_R_R_R 0x0020
|
||||
#define M68XG_OP_REL9 0x0040
|
||||
#define M68XG_OP_REL10 0x0080
|
||||
#define M68XG_OP_R_R_OFFS5 0x0100
|
||||
#define M68XG_OP_RD_RB_RI 0x0200
|
||||
#define M68XG_OP_RD_RB_RIp 0x0400
|
||||
#define M68XG_OP_RD_RB_mRI 0x0800
|
||||
#define M68XG_OP_R_IMM8 0x1000
|
||||
#define M68XG_OP_R_IMM16 0x2000
|
||||
#define M68XG_OP_REG 0x4000 /* Register operand 1. */
|
||||
#define M68XG_OP_REG_2 0x8000 /* Register operand 2. */
|
||||
#define M68XG_MAX_OPERANDS 3 /* Max operands of triadic r1, r2, r3. */
|
||||
|
||||
/* Markers to identify some instructions. */
|
||||
#define M6812_OP_EXG_MARKER 0x01000000 /* exg r1,r2 */
|
||||
#define M6812_OP_TFR_MARKER 0x02000000 /* tfr r1,r2 */
|
||||
|
@ -374,35 +394,43 @@
|
|||
#define M6812_OP_IBCC_MARKER 0x02000000 /* ibeq/ibne */
|
||||
#define M6812_OP_TBCC_MARKER 0x01000000
|
||||
|
||||
/* XGATE markers. */
|
||||
#define M68XG_OP_B_MARKER 0x04000000 /* bXX rel9 */
|
||||
#define M68XG_OP_BRA_MARKER 0x02000000 /* bra rel10 */
|
||||
|
||||
#define M6812_OP_TRAP_ID 0x80000000 /* trap #N */
|
||||
|
||||
#define M6811_OP_HIGH_ADDR 0x01000000 /* Used internally by gas. */
|
||||
#define M6811_OP_LOW_ADDR 0x02000000
|
||||
|
||||
#define M68HC12_BANK_VIRT 0x010000
|
||||
#define M68HC12_BANK_MASK 0x00003fff
|
||||
#define M68HC12_BANK_BASE 0x00008000
|
||||
#define M68HC12_BANK_SHIFT 14
|
||||
#define M68HC12_BANK_PAGE_MASK 0x0ff
|
||||
#define M68HC12_BANK_VIRT 0x010000
|
||||
#define M68HC12_BANK_MASK 0x00003fff
|
||||
#define M68HC12_BANK_BASE 0x00008000
|
||||
#define M68HC12_BANK_SHIFT 14
|
||||
#define M68HC12_BANK_PAGE_MASK 0x0ff
|
||||
|
||||
|
||||
/* CPU identification. */
|
||||
#define cpu6811 0x01
|
||||
#define cpu6812 0x02
|
||||
#define cpu6812s 0x04
|
||||
#define cpu9s12x 0x08 /* 9S12X main cpu. */
|
||||
#define cpuxgate 0x10 /* The XGATE module itself. */
|
||||
|
||||
/* The opcode table is an array of struct m68hc11_opcode. */
|
||||
struct m68hc11_opcode {
|
||||
const char* name; /* Op-code name */
|
||||
struct m68hc11_opcode
|
||||
{
|
||||
const char * name; /* Op-code name. */
|
||||
long format;
|
||||
unsigned char size;
|
||||
unsigned char opcode;
|
||||
unsigned int opcode;
|
||||
unsigned char cycles_low;
|
||||
unsigned char cycles_high;
|
||||
unsigned char set_flags_mask;
|
||||
unsigned char clr_flags_mask;
|
||||
unsigned char chg_flags_mask;
|
||||
unsigned char arch;
|
||||
unsigned int xg_mask; /* Mask with zero in register place for xgate. */
|
||||
};
|
||||
|
||||
/* Alias definition for 68HC12. */
|
||||
|
|
Loading…
Reference in New Issue