Emit saveri with the correct operand order, patch by Richard Pennington!
[oota-llvm.git] / lib / Target / Sparc / SparcRegisterInfo.cpp
index 4241f734e75c43085a6d7f17c57210a8b579f5db..92e92eabe7d49c635c16d9b8282ffe9740438ced 100644 (file)
@@ -137,7 +137,7 @@ void SparcRegisterInfo::emitPrologue(MachineFunction &MF) const {
   
   if (NumBytes >= -4096) {
     BuildMI(MBB, MBB.begin(), TII.get(SP::SAVEri),
-            SP::O6).addImm(NumBytes).addReg(SP::O6);
+            SP::O6).addReg(SP::O6).addImm(NumBytes);
   } else {
     MachineBasicBlock::iterator InsertPt = MBB.begin();
     // Emit this the hard way.  This clobbers G1 which we always know is