From: Trevor Saunders Date: Thu, 19 May 2016 02:39:18 +0000 (-0400) Subject: spu: make some constants unsigned X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=2900e701e0f0216b17e04e4fff1ca4711a9c072f;p=deliverable%2Fbinutils-gdb.git 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 * config/tc-spu.c (APUOP): Use OPCODE as an unsigned constant. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 20c87025fb..6809c67766 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2016-05-23 Trevor Saunders + + * config/tc-spu.c (APUOP): Use OPCODE as an unsigned constant. + 2016-05-23 Trevor Saunders * config/tc-tic54x.c (tic54x_mmregs): Adjust. diff --git a/gas/config/tc-spu.c b/gas/config/tc-spu.c index c08dcb5647..24969c97ab 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"