Print negative immediates as negative values instead of large constants
authorChris Lattner <sabre@nondot.org>
Wed, 12 Jul 2006 23:24:02 +0000 (23:24 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 12 Jul 2006 23:24:02 +0000 (23:24 +0000)
when using the immshifted addressing mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29130 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCAsmPrinter.cpp

index bb008430946ff02f85d06c0fb9299952e595894d..40cbd932a4d02c17793373adb0a1637cbedfe195 100644 (file)
@@ -125,7 +125,7 @@ namespace {
       O << (unsigned short)MI->getOperand(OpNo).getImmedValue();
     }
     void printS16X4ImmOperand(const MachineInstr *MI, unsigned OpNo) {
-      O << (short)MI->getOperand(OpNo).getImmedValue()*4;
+      O << (short)(MI->getOperand(OpNo).getImmedValue()*4);
     }
     void printBranchOperand(const MachineInstr *MI, unsigned OpNo) {
       // Branches can take an immediate operand.  This is used by the branch