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

llvm-svn: 12759
This commit is contained in:
Brian Gaeke 2004-04-07 17:33:56 +00:00
parent 6d62df5422
commit 85521d70dd
1 changed files with 4 additions and 2 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 ();
if (Val != 0) {
O << ((Val >= 0) ? " + " : " - ");
O << ((Val >= 0) ? Val : -Val);
}
O << "]";
}