aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-21 17:21:13 +0000
committerChris Lattner <sabre@nondot.org>2006-03-21 17:21:13 +0000
commit13feb58aa1042ed01962ade548459b8f01ba1a48 (patch)
tree5ab35dfe63810307e5cf0b299895aee128227239
parent7ab54047e7bdde3e57a3c9af2c88fb13bb950f44 (diff)
Print absolute memory references like this:
lwz r2, 8(0) instead of this: lwz r2, 8(r0) This fixes the llc/llc-beta failures on PPC last night. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26922 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/PowerPC/PPCAsmPrinter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 2b5ff5970e..9b33dd4bcb 100644
--- a/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -194,7 +194,11 @@ namespace {
void printMemRegImm(const MachineInstr *MI, unsigned OpNo) {
printSymbolLo(MI, OpNo);
O << '(';
- printOperand(MI, OpNo+1);
+ if (MI->getOperand(OpNo+1).isRegister() &&
+ MI->getOperand(OpNo+1).getReg() == PPC::R0)
+ O << "0";
+ else
+ printOperand(MI, OpNo+1);
O << ')';
}
void printMemRegReg(const MachineInstr *MI, unsigned OpNo) {