mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 02:24:17 +08:00
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.
This commit is contained in:
@ -617,8 +617,8 @@ s390_insert_operand (unsigned char *insn,
|
|||||||
if (val < min || val > max)
|
if (val < min || val > max)
|
||||||
{
|
{
|
||||||
const char *err =
|
const char *err =
|
||||||
_("operand out of range (%s not between %ld and %ld)");
|
_("operand out of range (%" PRId64 " not between %" PRId64
|
||||||
char buf[100];
|
" and %" PRId64 ")");
|
||||||
|
|
||||||
if (operand->flags & S390_OPERAND_PCREL)
|
if (operand->flags & S390_OPERAND_PCREL)
|
||||||
{
|
{
|
||||||
@ -626,11 +626,11 @@ s390_insert_operand (unsigned char *insn,
|
|||||||
min <<= 1;
|
min <<= 1;
|
||||||
max <<= 1;
|
max <<= 1;
|
||||||
}
|
}
|
||||||
bfd_sprintf_vma (stdoutput, buf, val);
|
|
||||||
if (file == (char *) NULL)
|
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
|
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;
|
return;
|
||||||
}
|
}
|
||||||
/* val is ok, now restrict it to operand->bits bits. */
|
/* val is ok, now restrict it to operand->bits bits. */
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
.*: Assembler messages:
|
.*: Assembler messages:
|
||||||
.*:3: Error: operand out of range \(fffffffefffffffe not between 0 and 4294967294\)
|
.*:3: Error: operand out of range \(-4294967298 not between -4294967296 and 4294967294\)
|
||||||
.*:4: Error: operand out of range \(0000000100000000 not between 0 and 4294967294\)
|
.*:4: Error: operand out of range \(4294967296 not between -4294967296 and 4294967294\)
|
||||||
|
Reference in New Issue
Block a user