summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 13:48:42 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 13:48:42 +0000
commitc4368a1507ac072a4b5da5d7dbcbf66bdfe6595f (patch)
tree6e6ae578f7a510641183b222d5ced310ce432e2c /lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
parent3240740ef4a473912ababc42d17dd33d0b1b2898 (diff)
downloadllvm-c4368a1507ac072a4b5da5d7dbcbf66bdfe6595f.tar.gz
llvm-c4368a1507ac072a4b5da5d7dbcbf66bdfe6595f.tar.bz2
llvm-c4368a1507ac072a4b5da5d7dbcbf66bdfe6595f.tar.xz
Swap the order of imm and idx field for rri addrmode in order to make handling of rri and ri addrmodes common
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp')
-rw-r--r--lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
index 025119c703..20814d0efd 100644
--- a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
+++ b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
@@ -208,10 +208,10 @@ void SystemZAsmPrinter::printRIAddrOperand(const MachineInstr *MI, int OpNum,
void SystemZAsmPrinter::printRRIAddrOperand(const MachineInstr *MI, int OpNum,
const char* Modifier) {
const MachineOperand &Base = MI->getOperand(OpNum);
- const MachineOperand &Index = MI->getOperand(OpNum+1);
+ const MachineOperand &Index = MI->getOperand(OpNum+2);
// Print displacement operand.
- printOperand(MI, OpNum+2);
+ printOperand(MI, OpNum+1);
// Print base operand (if any)
if (Base.getReg()) {
@@ -219,7 +219,7 @@ void SystemZAsmPrinter::printRRIAddrOperand(const MachineInstr *MI, int OpNum,
printOperand(MI, OpNum);
if (Index.getReg()) {
O << ',';
- printOperand(MI, OpNum+1);
+ printOperand(MI, OpNum+2);
}
O << ')';
} else