aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-arm.c15
2 files changed, 12 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6f3529e..6031f59 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/tc-arm.c (encode_branch): Remove superfluous braces.
+ (do_t_branch): Move reloc setting to end of routine.
+
2010-10-04 David Daney <ddaney@caviumnetworks.com>
* config/tc-mips.c (mips_fix_cn63xxp1): New variable.
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index fc3d63d..69ff36a 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -7285,9 +7285,7 @@ encode_branch (int default_reloc)
inst.reloc.type = BFD_RELOC_ARM_PLT32;
}
else
- {
- inst.reloc.type = (bfd_reloc_code_real_type) default_reloc;
- }
+ inst.reloc.type = (bfd_reloc_code_real_type) default_reloc;
inst.reloc.pc_rel = 1;
}
@@ -9666,6 +9664,7 @@ do_t_branch (void)
{
int opcode;
int cond;
+ int reloc;
cond = inst.cond;
set_it_insn_type (IF_INSIDE_IT_LAST_INSN);
@@ -9688,29 +9687,29 @@ do_t_branch (void)
{
inst.instruction = THUMB_OP32(opcode);
if (cond == COND_ALWAYS)
- inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH25;
+ reloc = BFD_RELOC_THUMB_PCREL_BRANCH25;
else
{
gas_assert (cond != 0xF);
inst.instruction |= cond << 22;
- inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH20;
+ reloc = BFD_RELOC_THUMB_PCREL_BRANCH20;
}
}
else
{
inst.instruction = THUMB_OP16(opcode);
if (cond == COND_ALWAYS)
- inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH12;
+ reloc = BFD_RELOC_THUMB_PCREL_BRANCH12;
else
{
inst.instruction |= cond << 8;
- inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH9;
+ reloc = BFD_RELOC_THUMB_PCREL_BRANCH9;
}
/* Allow section relaxation. */
if (unified_syntax && inst.size_req != 2)
inst.relax = opcode;
}
-
+ inst.reloc.type = reloc;
inst.reloc.pc_rel = 1;
}