From c66827056daabd0b8e8bfd0cf62767fdfc4a1918 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 9 Jul 2002 09:46:18 +0000 Subject: [PATCH] * config/tc-i386.c (md_pseudo_table ): Warning fix. (BFD_RELOC_8, BFD_RELOC_8_PCREL): Define for non-BFD. (md_apply_fix3): Formatting. Remove redundant test. (tc_gen_reloc): Remove redundant code. (tc_i386_force_relocation): Delete. Movy body of function to.. * config/tc-i386.h (TC_FORCE_RELOCATION): .. here. --- gas/ChangeLog | 9 +++++++++ gas/config/tc-i386.c | 32 ++++++++------------------------ gas/config/tc-i386.h | 11 +++++++++-- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index e058276fc65..dd26b0b8e62 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2002-07-09 Alan Modra + + * config/tc-i386.c (md_pseudo_table ): Warning fix. + (BFD_RELOC_8, BFD_RELOC_8_PCREL): Define for non-BFD. + (md_apply_fix3): Formatting. Remove redundant test. + (tc_gen_reloc): Remove redundant code. + (tc_i386_force_relocation): Delete. Movy body of function to.. + * config/tc-i386.h (TC_FORCE_RELOCATION): .. here. + 2002-07-09 Federico G. Schwindt * configure.in: Add hppa-*-openbsd* target, change diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 5cf82511d69..2711fee2362 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -435,7 +435,7 @@ const pseudo_typeS md_pseudo_table[] = {"code64", set_code_flag, CODE_64BIT}, {"intel_syntax", set_intel_syntax, 1}, {"att_syntax", set_intel_syntax, 0}, - {"file", dwarf2_directive_file, 0}, + {"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0}, {"loc", dwarf2_directive_loc, 0}, {0, 0, 0} }; @@ -1130,21 +1130,6 @@ pt (t) #endif /* DEBUG386 */ -int -tc_i386_force_relocation (fixp) - struct fix *fixp; -{ -#ifdef BFD_ASSEMBLER - if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT - || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) - return 1; - return 0; -#else - /* For COFF. */ - return fixp->fx_r_type == 7; -#endif -} - #ifdef BFD_ASSEMBLER static bfd_reloc_code_real_type reloc PARAMS ((int, int, int, bfd_reloc_code_real_type)); @@ -1235,8 +1220,10 @@ tc_i386_fix_adjustable (fixP) } #else #define reloc(SIZE,PCREL,SIGN,OTHER) 0 +#define BFD_RELOC_8 0 #define BFD_RELOC_16 0 #define BFD_RELOC_32 0 +#define BFD_RELOC_8_PCREL 0 #define BFD_RELOC_16_PCREL 0 #define BFD_RELOC_32_PCREL 0 #define BFD_RELOC_386_PLT32 0 @@ -4462,12 +4449,12 @@ md_apply_fix3 (fixP, valP, seg) /* The fix we're to put in. */ fixS *fixP; /* Pointer to the value of the bits. */ - valueT * valP; + valueT *valP; /* Segment fix is from. */ segT seg ATTRIBUTE_UNUSED; { char *p = fixP->fx_where + fixP->fx_frag->fr_literal; - valueT value = * valP; + valueT value = *valP; #if defined (BFD_ASSEMBLER) && !defined (TE_Mach) if (fixP->fx_pcrel) @@ -4613,11 +4600,11 @@ md_apply_fix3 (fixP, valP, seg) break; } #endif /* defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) */ - * valP = value; + *valP = value; #endif /* defined (BFD_ASSEMBLER) && !defined (TE_Mach) */ /* Are we finished with this relocation now? */ - if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + if (fixP->fx_addsy == NULL) fixP->fx_done = 1; #ifdef BFD_ASSEMBLER else if (use_rela_relocations) @@ -5136,10 +5123,7 @@ tc_gen_reloc (section, fixp) if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) rel->address = fixp->fx_offset; - if (fixp->fx_pcrel) - rel->addend = fixp->fx_addnumber; - else - rel->addend = 0; + rel->addend = 0; } /* Use the rela in 64bit mode. */ else diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h index 8af855505d3..9bbf5ea527a 100644 --- a/gas/config/tc-i386.h +++ b/gas/config/tc-i386.h @@ -171,8 +171,15 @@ extern void x86_cons_fix_new PARAMS ((fragS *, unsigned int, unsigned int, expressionS *)); #endif -#define TC_FORCE_RELOCATION(fixp) tc_i386_force_relocation(fixp) -extern int tc_i386_force_relocation PARAMS ((struct fix *)); +#ifdef BFD_ASSEMBLER +#define TC_FORCE_RELOCATION(FIXP) \ + ((FIXP)->fx_r_type == BFD_RELOC_VTABLE_INHERIT \ + || (FIXP)->fx_r_type == BFD_RELOC_VTABLE_ENTRY) +#else +/* For COFF. */ +#define TC_FORCE_RELOCATION(FIXP) \ + ((FIXP)->fx_r_type == 7) +#endif #ifdef BFD_ASSEMBLER #define NO_RELOC BFD_RELOC_NONE -- 2.30.2