aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1999-08-18 09:12:11 +0000
committerNick Clifton <nickc@redhat.com>1999-08-18 09:12:11 +0000
commit50f4163fd63dbf5088455692ee0a640fb0d91498 (patch)
treeb96f14bce264cbefd2093e3220e1cd455575cdd2 /gas
parent00692651e0142d5a0d6213567ad234804d28fef4 (diff)
downloadgdb-50f4163fd63dbf5088455692ee0a640fb0d91498.zip
gdb-50f4163fd63dbf5088455692ee0a640fb0d91498.tar.gz
gdb-50f4163fd63dbf5088455692ee0a640fb0d91498.tar.bz2
If an offset is invalid, display it.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-arm.c16
2 files changed, 14 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1f6b8ff..12d2d4f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+1999-08-18 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (md_apply_fix3): If an offset is invalid,
+ display its value.
+
1999-08-17 Ian Lance Taylor <ian@zembu.com>
* config/tc-ppc.c (md_assemble): Trim @ha constant to 16 bits, to
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index b5d8f3d..ae4b629 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -5404,7 +5404,8 @@ md_apply_fix3 (fixP, val, seg)
if (validate_offset_imm (value, 0) == FAIL)
{
- as_bad (_("bad immediate value for offset (%ld)"), (long) value);
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("bad immediate value for offset (%ld)"), (long) value);
break;
}
@@ -5427,7 +5428,8 @@ md_apply_fix3 (fixP, val, seg)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("invalid literal constant: pool needs to be closer"));
else
- as_bad (_("bad immediate value for half-word offset (%ld)"), (long) value);
+ as_bad (_("bad immediate value for half-word offset (%ld)"),
+ (long) value);
break;
}
@@ -5661,7 +5663,7 @@ md_apply_fix3 (fixP, val, seg)
if ((value + 2) & ~0x3fe)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid offset"));
+ _("Invalid offset, value too big (0x%08X)"), value);
/* Round up, since pc will be rounded down. */
newval |= (value + 2) >> 2;
@@ -5670,28 +5672,28 @@ md_apply_fix3 (fixP, val, seg)
case 9: /* SP load/store */
if (value & ~0x3fc)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid offset"));
+ _("Invalid offset, value too big (0x%08X)"), value);
newval |= value >> 2;
break;
case 6: /* Word load/store */
if (value & ~0x7c)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid offset"));
+ _("Invalid offset, value too big (0x%08X)"), value);
newval |= value << 4; /* 6 - 2 */
break;
case 7: /* Byte load/store */
if (value & ~0x1f)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid offset"));
+ _("Invalid offset, value too big (0x%08X)"), value);
newval |= value << 6;
break;
case 8: /* Halfword load/store */
if (value & ~0x3e)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid offset"));
+ _("Invalid offset, value too big (0x%08X)"), value);
newval |= value << 5; /* 6 - 1 */
break;