diff options
author | Alan Modra <amodra@gmail.com> | 2016-05-18 11:27:56 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-05-18 12:43:21 +0930 |
commit | a255f00a28d31979293d10cd2b121a1ca8d1fcf9 (patch) | |
tree | d1f034e5fd2a9e26a8fed900c54964c51314cba8 /gas/config/tc-ppc.c | |
parent | dec880ee27480b00fd7ce32196fc39a208f2fce5 (diff) | |
download | gdb-a255f00a28d31979293d10cd2b121a1ca8d1fcf9.zip gdb-a255f00a28d31979293d10cd2b121a1ca8d1fcf9.tar.gz gdb-a255f00a28d31979293d10cd2b121a1ca8d1fcf9.tar.bz2 |
PPC_OPERAND_SIGNOPT range.
Commit b84bf58a accidentally extended the range of allowed negative
numbers.
* config/tc-ppc.c (ppc_insert_operand): Trim PPC_OPERAND_SIGNOPT
allowed negative range.
* testsuite/gas/ppc/power9.s: Test xxspltib of -128, not -256.
* testsuite/gas/ppc/power9.d: Update.
Diffstat (limited to 'gas/config/tc-ppc.c')
-rw-r--r-- | gas/config/tc-ppc.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 6346570..2492573 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -1787,17 +1787,15 @@ ppc_insert_operand (unsigned long insn, if ((operand->flags & PPC_OPERAND_SIGNOPT) != 0) { - /* Extend the allowed range for addis to [-65536, 65535]. - Similarly for some VLE high part insns. For 64-bit it - would be good to disable this for signed fields since the + /* Extend the allowed range for addis to [-32768, 65535]. + Similarly for cmpli and some VLE high part insns. For 64-bit + it would be good to disable this for signed fields since the value is sign extended into the high 32 bits of the register. If the value is, say, an address, then we might care about the high bits. However, gcc as of 2014-06 uses unsigned values when loading the high part of 64-bit constants using - lis. - Use the same extended range for cmpli, to allow at least - [-32768, 65535]. */ - min = ~max & -right; + lis. */ + min = ~(max >> 1) & -right; } else if ((operand->flags & PPC_OPERAND_SIGNED) != 0) { |