aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-04-20 14:35:40 +0000
committerNick Clifton <nickc@redhat.com>2005-04-20 14:35:40 +0000
commit55e08f71a9aabef35b7892ffd25aca884bcb3c4a (patch)
tree6e49092fef5a5a0542b311d0d1cd0c87dcf20f6e /gas
parent1f8b1395941f24aa0d11ad54fd1ab51cbb850c59 (diff)
downloadgdb-55e08f71a9aabef35b7892ffd25aca884bcb3c4a.zip
gdb-55e08f71a9aabef35b7892ffd25aca884bcb3c4a.tar.gz
gdb-55e08f71a9aabef35b7892ffd25aca884bcb3c4a.tar.bz2
(macro): Use sprintf_vma to convert a > 32 bit number into a readable string.
(load_register): Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-mips.c25
2 files changed, 22 insertions, 9 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 4304447..b75c42e 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2005-04-20 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-mips.c (macro): Use sprintf_vma to convert a > 32 bit
+ number into a readable string.
+ (load_register): Likewise.
+
2005-04-20 Andreas Schwab <schwab@suse.de>
* config/tc-ia64.c (specify_resource): Initialize all of tmpl.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 24ba8b1..e54fbe4 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -3555,9 +3555,10 @@ load_register (int reg, expressionS *ep, int dbl)
if (!dbl || HAVE_32BIT_GPRS)
{
- as_bad (_("Number (0x%lx%08lx) larger than 32 bits"),
- (unsigned long) (ep->X_add_number >> 32),
- (unsigned long) (ep->X_add_number & 0xffffffff));
+ char value[32];
+
+ sprintf_vma (value, ep->X_add_number);
+ as_bad (_("Number (%s) larger than 32 bits"), value);
macro_build (ep, "addiu", "t,r,j", reg, 0, BFD_RELOC_LO16);
return;
}
@@ -5800,9 +5801,12 @@ macro (struct mips_cl_insn *ip)
if (HAVE_32BIT_ADDRESSES
&& !IS_SEXT_32BIT_NUM (offset_expr.X_add_number))
- as_bad (_("Number (0x%lx%08lx) larger than 32 bits"),
- (unsigned long) (offset_expr.X_add_number >> 32),
- (unsigned long) (offset_expr.X_add_number & 0xffffffff));
+ {
+ char value [32];
+
+ sprintf_vma (value, offset_expr.X_add_number);
+ as_bad (_("Number (%s) larger than 32 bits"), value);
+ }
/* A constant expression in PIC code can be handled just as it
is in non PIC code. */
@@ -6391,9 +6395,12 @@ macro (struct mips_cl_insn *ip)
if (HAVE_32BIT_ADDRESSES
&& !IS_SEXT_32BIT_NUM (offset_expr.X_add_number))
- as_bad (_("Number (0x%lx%08lx) larger than 32 bits"),
- (unsigned long) (offset_expr.X_add_number >> 32),
- (unsigned long) (offset_expr.X_add_number & 0xffffffff));
+ {
+ char value [32];
+
+ sprintf_vma (value, offset_expr.X_add_number);
+ as_bad (_("Number (%s) larger than 32 bits"), value);
+ }
/* Even on a big endian machine $fn comes before $fn+1. We have
to adjust when loading from memory. We set coproc if we must