X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fconfig%2Ftc-arm.c;h=8ea3ad198b7be1d4455bfdd44e85d12dd97c9331;hb=945c025aafa9f4f36cdc5bb2f1dad083fa34a6d2;hp=40c598ec6a86e7d7ea98cfaf6f8714dabd749826;hpb=7a1d4c38938b172a8f3fdb38b01551306bd51d8d;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 40c598ec6a..8ea3ad198b 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -232,6 +232,12 @@ static int meabi_flags = EABI_DEFAULT; # else static int meabi_flags = EF_ARM_EABI_UNKNOWN; # endif + +bfd_boolean +arm_is_eabi(void) +{ + return (EF_ARM_EABI_VERSION (meabi_flags) >= EF_ARM_EABI_VER4); +} #endif #ifdef OBJ_ELF @@ -2282,7 +2288,7 @@ s_unreq (int a ATTRIBUTE_UNUSED) static enum mstate mapstate = MAP_UNDEFINED; -static void +void mapping_state (enum mstate state) { symbolS * symbolP; @@ -7719,16 +7725,16 @@ static void do_vfp_sp_const (void) { encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Sd); - inst.instruction |= (inst.operands[1].imm & 15) << 16; - inst.instruction |= (inst.operands[1].imm >> 4); + inst.instruction |= (inst.operands[1].imm & 0xf0) << 12; + inst.instruction |= (inst.operands[1].imm & 0x0f); } static void do_vfp_dp_const (void) { encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Dd); - inst.instruction |= (inst.operands[1].imm & 15) << 16; - inst.instruction |= (inst.operands[1].imm >> 4); + inst.instruction |= (inst.operands[1].imm & 0xf0) << 12; + inst.instruction |= (inst.operands[1].imm & 0x0f); } static void @@ -8970,7 +8976,7 @@ do_t_cpy (void) } static void -do_t_czb (void) +do_t_cbz (void) { constraint (current_it_mask, BAD_NOT_IT); constraint (inst.operands[0].reg > 7, BAD_HIREG); @@ -14980,8 +14986,8 @@ static const struct asm_opcode insns[] = TC3(ldrsbt, 03000d0, f9100e00, 2, (RR, ADDR), ldsttv4, t_ldstt), TC3(strht, 02000b0, f8200e00, 2, (RR, ADDR), ldsttv4, t_ldstt), - UT(cbnz, b900, 2, (RR, EXP), t_czb), - UT(cbz, b100, 2, (RR, EXP), t_czb), + UT(cbnz, b900, 2, (RR, EXP), t_cbz), + UT(cbz, b100, 2, (RR, EXP), t_cbz), /* ARM does not really have an IT instruction, so always allow it. */ #undef ARM_VARIANT #define ARM_VARIANT &arm_ext_v1 @@ -18027,8 +18033,8 @@ md_apply_fix (fixS * fixP, } break; - case BFD_RELOC_THUMB_PCREL_BRANCH7: /* CZB */ - /* CZB can only branch forward. */ + case BFD_RELOC_THUMB_PCREL_BRANCH7: /* CBZ */ + /* CBZ can only branch forward. */ if (value & ~0x7e) as_bad_where (fixP->fx_file, fixP->fx_line, _("branch out of range")); @@ -18959,36 +18965,7 @@ arm_force_relocation (struct fix * fixp) return generic_force_reloc (fixp); } -#ifdef OBJ_COFF -bfd_boolean -arm_fix_adjustable (fixS * fixP) -{ - /* This is a little hack to help the gas/arm/adrl.s test. It prevents - local labels from being added to the output symbol table when they - are used with the ADRL pseudo op. The ADRL relocation should always - be resolved before the binbary is emitted, so it is safe to say that - it is adjustable. */ - if (fixP->fx_r_type == BFD_RELOC_ARM_ADRL_IMMEDIATE) - return 1; - - /* This is a hack for the gas/all/redef2.s test. This test causes symbols - to be cloned, and without this test relocs would still be generated - against the original, pre-cloned symbol. Such symbols would not appear - in the symbol table however, and so a valid reloc could not be - generated. So check to see if the fixup is against a symbol which has - been removed from the symbol chain, and if it is, then allow it to be - adjusted into a reloc against a section symbol. */ - if (fixP->fx_addsy != NULL - && ! S_IS_LOCAL (fixP->fx_addsy) - && symbol_next (fixP->fx_addsy) == NULL - && symbol_next (fixP->fx_addsy) == symbol_previous (fixP->fx_addsy)) - return 1; - - return 0; -} -#endif - -#ifdef OBJ_ELF +#if defined (OBJ_ELF) || defined (OBJ_COFF) /* Relocations against function names must be left unadjusted, so that the linker can use this information to generate interworking stubs. The MIPS version of this function @@ -19041,6 +19018,9 @@ arm_fix_adjustable (fixS * fixP) return 1; } +#endif /* defined (OBJ_ELF) || defined (OBJ_COFF) */ + +#ifdef OBJ_ELF const char * elf32_arm_target_format (void) @@ -19159,7 +19139,7 @@ arm_adjust_symtab (void) if (THUMB_IS_FUNC (sym)) elf_sym->internal_elf_sym.st_info = ELF_ST_INFO (bind, STT_ARM_TFUNC); - else + else if (EF_ARM_EABI_VERSION (meabi_flags) < EF_ARM_EABI_VER4) elf_sym->internal_elf_sym.st_info = ELF_ST_INFO (bind, STT_ARM_16BIT); }