From: Julian Brown Date: Thu, 15 Jun 2006 15:25:02 +0000 (+0000) Subject: gas/ X-Git-Tag: binutils-csl-sourcerygxx-3_4_4-21~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46fc5dd35d709548c06dba7ef1b5b96c7ea64319;p=thirdparty%2Fbinutils-gdb.git gas/ * config/tc-arm.c (do_vfp_nsyn_ldr_str): Remove, fold into... (do_neon_ldr_str): Always defer to VFP encoding routines, which handle relocs properly. --- diff --git a/ChangeLog.csl b/ChangeLog.csl index c03c1c9cc8a..e6511b02b03 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,10 @@ +2006-06-15 Julian Brown + + gas/ + * config/tc-arm.c (do_vfp_nsyn_ldr_str): Remove, fold into... + (do_neon_ldr_str): Always defer to VFP encoding routines, which handle + relocs properly. + 2006-05-25 Alan Modra * bfd/elf.c (sym_is_global): Return a bfd_boolean. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 0775c27afd6..2129f3c0cbe 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -10619,15 +10619,6 @@ do_vfp_nsyn_ldm_stm (int is_dbmode) } } -static void -do_vfp_nsyn_ldr_str (int is_ldr) -{ - if (is_ldr) - do_vfp_nsyn_opcode ("flds"); - else - do_vfp_nsyn_opcode ("fsts"); -} - static void do_vfp_nsyn_sqrt (void) { @@ -12650,58 +12641,22 @@ do_neon_ldm_stm (void) static void do_neon_ldr_str (void) { - unsigned offsetbits; - int offset_up = 1; int is_ldr = (inst.instruction & (1 << 20)) != 0; if (inst.operands[0].issingle) { - do_vfp_nsyn_ldr_str (is_ldr); - return; - } - - inst.instruction |= LOW4 (inst.operands[0].reg) << 12; - inst.instruction |= HI1 (inst.operands[0].reg) << 22; - - constraint (inst.reloc.pc_rel && !is_ldr, - _("PC-relative addressing unavailable with VSTR")); - - constraint (!inst.reloc.pc_rel && inst.reloc.exp.X_op != O_constant, - _("Immediate value must be a constant")); - - if (inst.reloc.exp.X_add_number < 0) - { - offset_up = 0; - offsetbits = -inst.reloc.exp.X_add_number / 4; + if (is_ldr) + do_vfp_nsyn_opcode ("flds"); + else + do_vfp_nsyn_opcode ("fsts"); } else - offsetbits = inst.reloc.exp.X_add_number / 4; - - /* FIXME: Does this catch everything? */ - constraint (!inst.operands[1].isreg || !inst.operands[1].preind - || inst.operands[1].postind || inst.operands[1].writeback - || inst.operands[1].immisreg || inst.operands[1].shifted, - BAD_ADDR_MODE); - constraint ((inst.operands[1].imm & 3) != 0, - _("Offset must be a multiple of 4")); - constraint (offsetbits != (offsetbits & 0xff), - _("Immediate offset out of range")); - - inst.instruction |= inst.operands[1].reg << 16; - inst.instruction |= offsetbits & 0xff; - inst.instruction |= offset_up << 23; - - do_vfp_cond_or_thumb (); - - if (inst.reloc.pc_rel) { - if (thumb_mode) - inst.reloc.type = BFD_RELOC_ARM_T32_CP_OFF_IMM; + if (is_ldr) + do_vfp_nsyn_opcode ("fldd"); else - inst.reloc.type = BFD_RELOC_ARM_CP_OFF_IMM; + do_vfp_nsyn_opcode ("fstd"); } - else - inst.reloc.type = BFD_RELOC_UNUSED; } /* "interleave" version also handles non-interleaving register VLD1/VST1