aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-05-12 11:15:24 +0930
committerAlan Modra <amodra@gmail.com>2022-05-12 11:49:45 +0930
commita2d8448d1db6b052303dbbd576be1c00128e1bc6 (patch)
treedef1c6fa7dc33fa663fa9198693ef84d044df383 /gas/config
parent6c8c5823e38236574bd46b664e7e8db8b31cac22 (diff)
downloadgdb-a2d8448d1db6b052303dbbd576be1c00128e1bc6.zip
gdb-a2d8448d1db6b052303dbbd576be1c00128e1bc6.tar.gz
gdb-a2d8448d1db6b052303dbbd576be1c00128e1bc6.tar.bz2
Re: IBM zSystems: Accept (. - 0x100000000) PCRel32 operands
The new test failed on s390-linux due to bfd_sprintf_vma trimming output to 32 bits for 32-bit targets. The test was faulty anyway, expecting zero as the min end of the range is plainly wrong, but that's what you get if you cast min to int. * config/tc-s390.c (s390_insert_operand): Print range error using PRId64. * testsuite/gas/s390/zarch-z900-err.l: Correct expected output.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-s390.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index 4fd4f1f..fb452f8 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -617,8 +617,8 @@ s390_insert_operand (unsigned char *insn,
if (val < min || val > max)
{
const char *err =
- _("operand out of range (%s not between %ld and %ld)");
- char buf[100];
+ _("operand out of range (%" PRId64 " not between %" PRId64
+ " and %" PRId64 ")");
if (operand->flags & S390_OPERAND_PCREL)
{
@@ -626,11 +626,11 @@ s390_insert_operand (unsigned char *insn,
min <<= 1;
max <<= 1;
}
- bfd_sprintf_vma (stdoutput, buf, val);
if (file == (char *) NULL)
- as_bad (err, buf, (int) min, (int) max);
+ as_bad (err, (int64_t) val, (int64_t) min, (int64_t) max);
else
- as_bad_where (file, line, err, buf, (int) min, (int) max);
+ as_bad_where (file, line,
+ err, (int64_t) val, (int64_t) min, (int64_t) max);
return;
}
/* val is ok, now restrict it to operand->bits bits. */