From 50f4163fd63dbf5088455692ee0a640fb0d91498 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 18 Aug 1999 09:12:11 +0000 Subject: [PATCH] If an offset is invalid, display it. --- gas/ChangeLog | 5 +++++ gas/config/tc-arm.c | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 1f6b8ff699c..12d2d4f83b0 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +1999-08-18 Nick Clifton + + * config/tc-arm.c (md_apply_fix3): If an offset is invalid, + display its value. + 1999-08-17 Ian Lance Taylor * 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 b5d8f3dbd03..ae4b6295393 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; -- 2.30.2