mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 14:59:31 +08:00
PR gas/11972
* config/tc-arm.c (parse_big_immediate): Allow for bignums being extended to the size of a .octa.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2010-09-09 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR gas/11972
|
||||||
|
* config/tc-arm.c (parse_big_immediate): Allow for bignums being
|
||||||
|
extended to the size of a .octa.
|
||||||
|
|
||||||
2010-09-08 Julian Brown <julian@codesourcery.com>
|
2010-09-08 Julian Brown <julian@codesourcery.com>
|
||||||
|
|
||||||
* config/tc-arm.c (create_neon_reg_alias): Deal with case
|
* config/tc-arm.c (create_neon_reg_alias): Deal with case
|
||||||
|
@ -4420,14 +4420,32 @@ parse_big_immediate (char **str, int i)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (exp.X_op == O_big
|
else if (exp.X_op == O_big
|
||||||
&& LITTLENUM_NUMBER_OF_BITS * exp.X_add_number > 32
|
&& LITTLENUM_NUMBER_OF_BITS * exp.X_add_number > 32)
|
||||||
&& LITTLENUM_NUMBER_OF_BITS * exp.X_add_number <= 64)
|
|
||||||
{
|
{
|
||||||
unsigned parts = 32 / LITTLENUM_NUMBER_OF_BITS, j, idx = 0;
|
unsigned parts = 32 / LITTLENUM_NUMBER_OF_BITS, j, idx = 0;
|
||||||
|
|
||||||
/* Bignums have their least significant bits in
|
/* Bignums have their least significant bits in
|
||||||
generic_bignum[0]. Make sure we put 32 bits in imm and
|
generic_bignum[0]. Make sure we put 32 bits in imm and
|
||||||
32 bits in reg, in a (hopefully) portable way. */
|
32 bits in reg, in a (hopefully) portable way. */
|
||||||
gas_assert (parts != 0);
|
gas_assert (parts != 0);
|
||||||
|
|
||||||
|
/* Make sure that the number is not too big.
|
||||||
|
PR 11972: Bignums can now be sign-extended to the
|
||||||
|
size of a .octa so check that the out of range bits
|
||||||
|
are all zero or all one. */
|
||||||
|
if (LITTLENUM_NUMBER_OF_BITS * exp.X_add_number > 64)
|
||||||
|
{
|
||||||
|
LITTLENUM_TYPE m = -1;
|
||||||
|
|
||||||
|
if (generic_bignum[parts * 2] != 0
|
||||||
|
&& generic_bignum[parts * 2] != m)
|
||||||
|
return FAIL;
|
||||||
|
|
||||||
|
for (j = parts * 2 + 1; j < (unsigned) exp.X_add_number; j++)
|
||||||
|
if (generic_bignum[j] != generic_bignum[j-1])
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
inst.operands[i].imm = 0;
|
inst.operands[i].imm = 0;
|
||||||
for (j = 0; j < parts; j++, idx++)
|
for (j = 0; j < parts; j++, idx++)
|
||||||
inst.operands[i].imm |= generic_bignum[idx]
|
inst.operands[i].imm |= generic_bignum[idx]
|
||||||
|
Reference in New Issue
Block a user