From: Nick Clifton Date: Wed, 18 Oct 2000 17:42:27 +0000 (+0000) Subject: RELAX_RELOC_*: New definitions for both BFD_ASSEMBLER and !BFD_ASSEMBLER. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5cbdaa774046c310202244a82e5fb5dd4d69ac2c;p=binutils-gdb.git RELAX_RELOC_*: New definitions for both BFD_ASSEMBLER and !BFD_ASSEMBLER. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index fa894630f35..1e070cf670a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2000-10-18 Michael Sokolov + + * config/tc-m68k.h (RELAX_RELOC_*): New definitions for both + BFD_ASSEMBLER and !BFD_ASSEMBLER. + * config/tc-m68k.c (md_convert_frag_1): Use them instead of + BFD_RELOC_*. + 2000-10-17 Kazu Hirata * debug.c: Fix formatting. diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index 2df91dcbf28..cb4a328be2c 100644 --- a/gas/config/tc-m68k.c +++ b/gas/config/tc-m68k.c @@ -4359,7 +4359,7 @@ md_convert_frag_1 (fragP) if (disp == 0) as_bad (_("short branch with zero offset: use :w")); fixP = fix_new (fragP, fragP->fr_fix - 1, 1, fragP->fr_symbol, - fragP->fr_offset, 1, BFD_RELOC_8_PCREL); + fragP->fr_offset, 1, RELAX_RELOC_PC8); fixP->fx_pcrel_adjust = -1; break; case TAB (BRANCHBWL, SHORT): @@ -4368,13 +4368,13 @@ md_convert_frag_1 (fragP) case TAB (BRANCHBW, SHORT): fragP->fr_opcode[1] = 0x00; fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, fragP->fr_offset, - 1, BFD_RELOC_16_PCREL); + 1, RELAX_RELOC_PC16); fragP->fr_fix += 2; break; case TAB (BRANCHBWL, LONG): fragP->fr_opcode[1] = (char) 0xFF; fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset, - 1, BFD_RELOC_32_PCREL); + 1, RELAX_RELOC_PC32); fragP->fr_fix += 4; break; case TAB (BRABSJUNC, LONG): @@ -4383,7 +4383,7 @@ md_convert_frag_1 (fragP) fragP->fr_opcode[0] = 0x4E; fragP->fr_opcode[1] = (char) 0xB9; /* JSR with ABSL LONG operand */ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset, - 0, BFD_RELOC_32); + 0, RELAX_RELOC_PC32); fragP->fr_fix += 4; } else if (fragP->fr_opcode[0] == 0x60) /* jbra */ @@ -4391,7 +4391,7 @@ md_convert_frag_1 (fragP) fragP->fr_opcode[0] = 0x4E; fragP->fr_opcode[1] = (char) 0xF9; /* JMP with ABSL LONG operand */ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset, - 0, BFD_RELOC_32); + 0, RELAX_RELOC_ABS32); fragP->fr_fix += 4; } else @@ -4415,25 +4415,25 @@ md_convert_frag_1 (fragP) *buffer_address++ = (char) 0xf9; fragP->fr_fix += 2; /* account for jmp instruction */ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, - fragP->fr_offset, 0, BFD_RELOC_32); + fragP->fr_offset, 0, RELAX_RELOC_ABS32); fragP->fr_fix += 4; break; case TAB (FBRANCH, SHORT): know ((fragP->fr_opcode[1] & 0x40) == 0); fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, fragP->fr_offset, - 1, BFD_RELOC_16_PCREL); + 1, RELAX_RELOC_PC16); fragP->fr_fix += 2; break; case TAB (FBRANCH, LONG): fragP->fr_opcode[1] |= 0x40; /* Turn on LONG bit */ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset, - 1, BFD_RELOC_32_PCREL); + 1, RELAX_RELOC_PC32); fragP->fr_fix += 4; break; case TAB (DBCCLBR, SHORT): case TAB (DBCCABSJ, SHORT): fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, fragP->fr_offset, - 1, BFD_RELOC_16_PCREL); + 1, RELAX_RELOC_PC16); fragP->fr_fix += 2; break; case TAB (DBCCLBR, LONG): @@ -4450,7 +4450,7 @@ md_convert_frag_1 (fragP) fragP->fr_fix += 6; /* account for bra/jmp instructions */ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset, 1, - BFD_RELOC_32_PCREL); + RELAX_RELOC_PC32); fragP->fr_fix += 4; break; case TAB (DBCCABSJ, LONG): @@ -4467,14 +4467,14 @@ md_convert_frag_1 (fragP) fragP->fr_fix += 6; /* account for bra/jmp instructions */ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset, 0, - BFD_RELOC_32); + RELAX_RELOC_ABS32); fragP->fr_fix += 4; break; case TAB (PCREL1632, SHORT): fragP->fr_opcode[1] &= ~0x3F; fragP->fr_opcode[1] |= 0x3A; /* 072 - mode 7.2 */ fix_new (fragP, (int) (fragP->fr_fix), 2, fragP->fr_symbol, - fragP->fr_offset, 1, BFD_RELOC_16_PCREL); + fragP->fr_offset, 1, RELAX_RELOC_PC16); fragP->fr_fix += 2; break; case TAB (PCREL1632, LONG): @@ -4484,7 +4484,7 @@ md_convert_frag_1 (fragP) *buffer_address++ = 0x70; fragP->fr_fix += 2; fixP = fix_new (fragP, (int) (fragP->fr_fix), 4, fragP->fr_symbol, - fragP->fr_offset, 1, BFD_RELOC_32_PCREL); + fragP->fr_offset, 1, RELAX_RELOC_PC32); fixP->fx_pcrel_adjust = 2; fragP->fr_fix += 4; break; @@ -4492,7 +4492,7 @@ md_convert_frag_1 (fragP) assert (fragP->fr_fix >= 2); buffer_address[-2] &= ~1; fixP = fix_new (fragP, fragP->fr_fix - 1, 1, fragP->fr_symbol, - fragP->fr_offset, 1, BFD_RELOC_8_PCREL); + fragP->fr_offset, 1, RELAX_RELOC_PC8); fixP->fx_pcrel_adjust = 1; break; case TAB (PCINDEX, SHORT): @@ -4500,7 +4500,7 @@ md_convert_frag_1 (fragP) buffer_address[-2] |= 0x1; buffer_address[-1] = 0x20; fixP = fix_new (fragP, (int) (fragP->fr_fix), 2, fragP->fr_symbol, - fragP->fr_offset, 1, BFD_RELOC_16_PCREL); + fragP->fr_offset, 1, RELAX_RELOC_PC16); fixP->fx_pcrel_adjust = 2; fragP->fr_fix += 2; break; @@ -4509,13 +4509,13 @@ md_convert_frag_1 (fragP) buffer_address[-2] |= 0x1; buffer_address[-1] = 0x30; fixP = fix_new (fragP, (int) (fragP->fr_fix), 4, fragP->fr_symbol, - fragP->fr_offset, 1, BFD_RELOC_32_PCREL); + fragP->fr_offset, 1, RELAX_RELOC_PC32); fixP->fx_pcrel_adjust = 2; fragP->fr_fix += 4; break; case TAB (ABSTOPCREL, SHORT): fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, fragP->fr_offset, - 1, BFD_RELOC_16_PCREL); + 1, RELAX_RELOC_PC16); fragP->fr_fix += 2; break; case TAB (ABSTOPCREL, LONG): @@ -4526,7 +4526,7 @@ md_convert_frag_1 (fragP) fragP->fr_opcode[1] &= ~0x3F; fragP->fr_opcode[1] |= 0x39; /* Mode 7.1 */ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset, - 0, BFD_RELOC_32); + 0, RELAX_RELOC_ABS32); fragP->fr_fix += 4; break; } diff --git a/gas/config/tc-m68k.h b/gas/config/tc-m68k.h index b7dd0c16a5d..8b304b4664e 100644 --- a/gas/config/tc-m68k.h +++ b/gas/config/tc-m68k.h @@ -157,6 +157,12 @@ do \ while (0) #define NO_RELOC BFD_RELOC_NONE +#define RELAX_RELOC_ABS8 BFD_RELOC_8 +#define RELAX_RELOC_ABS16 BFD_RELOC_16 +#define RELAX_RELOC_ABS32 BFD_RELOC_32 +#define RELAX_RELOC_PC8 BFD_RELOC_8_PCREL +#define RELAX_RELOC_PC16 BFD_RELOC_16_PCREL +#define RELAX_RELOC_PC32 BFD_RELOC_32_PCREL #ifdef OBJ_ELF @@ -194,7 +200,13 @@ extern void m68k_elf_final_processing PARAMS ((void)); #define tc_frob_coff_symbol(sym) m68k_frob_symbol (sym) -#define NO_RELOC 0 +#define NO_RELOC 0 +#define RELAX_RELOC_ABS8 0 +#define RELAX_RELOC_ABS16 0 +#define RELAX_RELOC_ABS32 0 +#define RELAX_RELOC_PC8 0 +#define RELAX_RELOC_PC16 0 +#define RELAX_RELOC_PC32 0 #endif /* ! BFD_ASSEMBLER */