Don't print [%reg + 0], just print [%reg]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12759 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Brian Gaeke 2004-04-07 17:33:56 +00:00
parent f3334ebbe3
commit 8005ed3bd7
2 changed files with 8 additions and 4 deletions

View File

@ -452,8 +452,10 @@ void V8Printer::printBaseOffsetPair (const MachineInstr *MI, int i) {
assert (MI->getOperand (i + 1).isImmediate()
&& "2nd half of base-offset pair must be immediate-value machine operand");
int Val = (int) MI->getOperand (i + 1).getImmedValue ();
O << ((Val >= 0) ? " + " : " - ");
O << ((Val >= 0) ? Val : -Val);
if (Val != 0) {
O << ((Val >= 0) ? " + " : " - ");
O << ((Val >= 0) ? Val : -Val);
}
O << "]";
}

View File

@ -452,8 +452,10 @@ void V8Printer::printBaseOffsetPair (const MachineInstr *MI, int i) {
assert (MI->getOperand (i + 1).isImmediate()
&& "2nd half of base-offset pair must be immediate-value machine operand");
int Val = (int) MI->getOperand (i + 1).getImmedValue ();
O << ((Val >= 0) ? " + " : " - ");
O << ((Val >= 0) ? Val : -Val);
if (Val != 0) {
O << ((Val >= 0) ? " + " : " - ");
O << ((Val >= 0) ? Val : -Val);
}
O << "]";
}