diff options
author | DJ Delorie <dj@redhat.com> | 2006-02-24 22:10:36 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2006-02-24 22:10:36 +0000 |
commit | 6772dd07c44296695b6b99e7a007ebb99948a364 (patch) | |
tree | 439d69e70ea80da38364e680912874faa3fd5283 /gas/config/tc-m32c.h | |
parent | ebdca51ad97f11dff355fb709a77403c8187be3f (diff) | |
download | gdb-6772dd07c44296695b6b99e7a007ebb99948a364.zip gdb-6772dd07c44296695b6b99e7a007ebb99948a364.tar.gz gdb-6772dd07c44296695b6b99e7a007ebb99948a364.tar.bz2 |
[include/elf]
* m32c.h: Add relax relocs.
[cpu]
* m32c.cpu (RL_TYPE): New attribute, with macros.
(Lab-8-24): Add RELAX.
(unary-insn-defn-g, binary-arith-imm-dst-defn,
binary-arith-imm4-dst-defn): Add 1ADDR attribute.
(binary-arith-src-dst-defn): Add 2ADDR attribute.
(jcnd16-5, jcnd16, jcnd32, jmp16.s, jmp16.b, jmp16.w, jmp16.a,
jmp32.s, jmp32.b, jmp32.w, jmp32.a, jsr16.w, jsr16.a): Add JUMP
attribute.
(jsri16, jsri32): Add 1ADDR attribute.
(jsr32.w, jsr32.a): Add JUMP attribute.
[opcodes]
* m32c-desc.c: Regenerate with linker relaxation attributes.
* m32c-desc.h: Likewise.
* m32c-dis.c: Likewise.
* m32c-opc.c: Likewise.
[gas]
* config/tc-m32c.h (md_apply_fix): Define to m32c_apply_fix.
(tc_gen_reloc): Don't define.
* config/tc-m32c.c (rl_for, relaxable): New convenience macros.
(OPTION_LINKRELAX): New.
(md_longopts): Add it.
(m32c_relax): New.
(md_parse_options): Set it.
(md_assemble): Emit relaxation relocs as needed.
(md_convert_frag): Emit relaxation relocs as needed.
(md_cgen_lookup_reloc): Add LAB_8_8 and LAB_8_16.
(m32c_apply_fix): New.
(tc_gen_reloc): New.
(m32c_force_relocation): Force out jump relocs when relaxing.
(m32c_fix_adjustable): Return false if relaxing.
[bfd]
* elf32-m32c.c (m32c_elf_howto_table): Add relaxation relocs.
(m32c_elf_relocate_section): Don't relocate them.
(compare_reloc): New.
(relax_reloc): Remove.
(m32c_offset_for_reloc): New.
(m16c_addr_encodings): New.
(m16c_jmpaddr_encodings): New.
(m32c_addr_encodings): New.
(m32c_elf_relax_section): Relax jumps and address displacements.
(m32c_elf_relax_delete_bytes): Adjust for internal syms. Fix up
short jumps.
* reloc.c: Add m32c relax relocs.
* libbfd.h: Regenerate.
Diffstat (limited to 'gas/config/tc-m32c.h')
-rw-r--r-- | gas/config/tc-m32c.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gas/config/tc-m32c.h b/gas/config/tc-m32c.h index 971b59d..3cdd1a14 100644 --- a/gas/config/tc-m32c.h +++ b/gas/config/tc-m32c.h @@ -47,7 +47,8 @@ long md_pcrel_from_section PARAMS ((struct fix *, segT)); /* We don't need to handle .word strangely. */ #define WORKING_DOT_WORD -#define md_apply_fix gas_cgen_md_apply_fix +#define md_apply_fix m32c_apply_fix +extern void m32c_apply_fix PARAMS ((struct fix *, valueT *, segT)); #define tc_fix_adjustable(fixP) m32c_fix_adjustable (fixP) extern bfd_boolean m32c_fix_adjustable PARAMS ((struct fix *)); @@ -66,8 +67,6 @@ extern void m32c_prepare_relax_scan PARAMS ((fragS *, offsetT *, relax_substateT /* Values passed to md_apply_fix don't include the symbol value. */ #define MD_APPLY_SYM_VALUE(FIX) 0 -#define tc_gen_reloc gas_cgen_tc_gen_reloc - /* Call md_pcrel_from_section(), not md_pcrel_from(). */ #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC) extern long md_pcrel_from_section PARAMS ((struct fix *, segT)); |