aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1999-08-16 17:47:29 +0000
committerNick Clifton <nickc@redhat.com>1999-08-16 17:47:29 +0000
commit114502711bc334a6c530a544033d4769c0703c70 (patch)
treef10d6f3f71be8d740f2a52b11b2f050ce8743e8a /gas
parent8535d39cc87f4c6690783ea979ad63e6192b34b8 (diff)
downloadfsf-binutils-gdb-114502711bc334a6c530a544033d4769c0703c70.zip
fsf-binutils-gdb-114502711bc334a6c530a544033d4769c0703c70.tar.gz
fsf-binutils-gdb-114502711bc334a6c530a544033d4769c0703c70.tar.bz2
Look for register conflicts on stores as well as loads.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-arm.c35
2 files changed, 22 insertions, 18 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 421d3c6..c47013a 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+1999-08-16 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (do_ldst): Look for register conflicts on stores
+ as well as loads.
+
1999-08-13 Nick Clifton <nickc@cygnus.com>
* config/tc-arm.c (validate_offset_imm): Work on unsigned values.
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 0f0cd70..b5d8f3d 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -2853,22 +2853,23 @@ do_ldst (str, flags)
if ((reg = reg_required_here (&str, 16)) == FAIL)
return;
- conflict_reg = (((conflict_reg == reg)
- && (inst.instruction & LOAD_BIT))
- ? 1 : 0);
+ /* Conflicts can occur on stores as well as loads. */
+ conflict_reg = (conflict_reg == reg);
skip_whitespace (str);
if (*str == ']')
{
- str++;
+ str ++;
+
if (skip_past_comma (&str) == SUCCESS)
{
/* [Rn],... (post inc) */
if (ldst_extend (&str, halfword) == FAIL)
return;
if (conflict_reg)
- as_warn (_("destination register same as write-back base\n"));
+ as_warn (_("%s register same as write-back base"),
+ (inst.instruction & LOAD_BIT) ? _("destination") : _("source") );
}
else
{
@@ -2881,7 +2882,8 @@ do_ldst (str, flags)
if (*str == '!')
{
if (conflict_reg)
- as_warn (_("destination register same as write-back base\n"));
+ as_warn (_("%s register same as write-back base"),
+ (inst.instruction & LOAD_BIT) ? _("destination") : _("source") );
str++;
inst.instruction |= WRITE_BACK;
}
@@ -2917,7 +2919,8 @@ do_ldst (str, flags)
if (*str == '!')
{
if (conflict_reg)
- as_tsktsk (_("destination register same as write-back base\n"));
+ as_warn (_("%s register same as write-back base"),
+ (inst.instruction & LOAD_BIT) ? _("destination") : _("source") );
str++;
inst.instruction |= WRITE_BACK;
}
@@ -5340,7 +5343,7 @@ md_apply_fix3 (fixP, val, seg)
&& (newimm = negate_data_op (&temp, value)) == (unsigned int) FAIL)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("invalid constant (%lx) after fixup\n"),
+ _("invalid constant (%lx) after fixup"),
(unsigned long) value);
break;
}
@@ -5374,7 +5377,7 @@ md_apply_fix3 (fixP, val, seg)
else
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Unable to compute ADRL instructions for PC offset of 0x%x\n"), value);
+ _("Unable to compute ADRL instructions for PC offset of 0x%x"), value);
break;
}
@@ -5422,7 +5425,7 @@ md_apply_fix3 (fixP, val, seg)
{
if (fixP->fx_r_type == BFD_RELOC_ARM_HWLITERAL)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("invalid literal constant: pool needs to be closer\n"));
+ _("invalid literal constant: pool needs to be closer"));
else
as_bad (_("bad immediate value for half-word offset (%ld)"), (long) value);
break;
@@ -5443,7 +5446,7 @@ md_apply_fix3 (fixP, val, seg)
if (validate_offset_imm (value, 0) == FAIL)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("invalid literal constant: pool needs to be closer\n"));
+ _("invalid literal constant: pool needs to be closer"));
break;
}
@@ -5797,7 +5800,7 @@ md_apply_fix3 (fixP, val, seg)
case BFD_RELOC_NONE:
default:
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Bad relocation fixup type (%d)\n"), fixP->fx_r_type);
+ _("Bad relocation fixup type (%d)"), fixP->fx_r_type);
}
return 1;
@@ -6217,13 +6220,9 @@ _("Warning: Use of the 'nv' conditional is deprecated\n"));
if (reg == FAIL)
{
if (regnum != FAIL)
- {
- insert_reg_alias (str, regnum);
- }
+ insert_reg_alias (str, regnum);
else
- {
- as_warn (_("register '%s' does not exist\n"), q);
- }
+ as_warn (_("register '%s' does not exist"), q);
}
else if (regnum != FAIL)
{