diff options
author | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-05-18 22:39:18 -0400 |
---|---|---|
committer | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-05-23 01:20:09 -0400 |
commit | 2900e701e0f0216b17e04e4fff1ca4711a9c072f (patch) | |
tree | 99ac4c26920dcefbc1d7a954f9cb716d2731bc61 /gas/config/tc-spu.c | |
parent | 3d207518c117df7a6c58f20bc2693171b7690650 (diff) | |
download | gdb-2900e701e0f0216b17e04e4fff1ca4711a9c072f.zip gdb-2900e701e0f0216b17e04e4fff1ca4711a9c072f.tar.gz gdb-2900e701e0f0216b17e04e4fff1ca4711a9c072f.tar.bz2 |
spu: make some constants unsigned
The field in spu_opcode is unsigned, and for some values of opcode we can end
up shifting into the high bit. So avoid possibly creating a negative number
and then assigning it to a unsigned field by shifting an unsigned constant.
gas/ChangeLog:
2016-05-23 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-spu.c (APUOP): Use OPCODE as an unsigned constant.
Diffstat (limited to 'gas/config/tc-spu.c')
-rw-r--r-- | gas/config/tc-spu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/config/tc-spu.c b/gas/config/tc-spu.c index c08dcb5..24969c9 100644 --- a/gas/config/tc-spu.c +++ b/gas/config/tc-spu.c @@ -26,7 +26,7 @@ const struct spu_opcode spu_opcodes[] = { #define APUOP(TAG,MACFORMAT,OPCODE,MNEMONIC,ASMFORMAT,DEP,PIPE) \ - { MACFORMAT, (OPCODE) << (32-11), MNEMONIC, ASMFORMAT }, + { MACFORMAT, (OPCODE ## u) << (32-11), MNEMONIC, ASMFORMAT }, #define APUOPFB(TAG,MACFORMAT,OPCODE,FB,MNEMONIC,ASMFORMAT,DEP,PIPE) \ { MACFORMAT, ((OPCODE) << (32-11)) | ((FB) << (32-18)), MNEMONIC, ASMFORMAT }, #include "opcode/spu-insns.h" |