[llvm-commits] [llvm] r53472 - /llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp

Chris Lattner sabre at nondot.org
Fri Jul 11 13:53:00 PDT 2008


Author: lattner
Date: Fri Jul 11 15:53:00 2008
New Revision: 53472

URL: http://llvm.org/viewvc/llvm-project?rev=53472&view=rev
Log:
add support for returning i128, PR2532.

Modified:
    llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=53472&r1=53471&r2=53472&view=diff

==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Fri Jul 11 15:53:00 2008
@@ -685,6 +685,20 @@
       DAG.getMachineFunction().getRegInfo().addLiveOut(ARM::R1);
     }
     break;
+  case 9:  // i128 -> 4 regs
+    Copy = DAG.getCopyToReg(Chain, ARM::R3, Op.getOperand(7), SDOperand());
+    Copy = DAG.getCopyToReg(Copy , ARM::R2, Op.getOperand(5), Copy.getValue(1));
+    Copy = DAG.getCopyToReg(Copy , ARM::R1, Op.getOperand(3), Copy.getValue(1));
+    Copy = DAG.getCopyToReg(Copy , ARM::R0, Op.getOperand(1), Copy.getValue(1));
+    // If we haven't noted the R0+R1 are live out, do so now.
+    if (DAG.getMachineFunction().getRegInfo().liveout_empty()) {
+      DAG.getMachineFunction().getRegInfo().addLiveOut(ARM::R0);
+      DAG.getMachineFunction().getRegInfo().addLiveOut(ARM::R1);
+      DAG.getMachineFunction().getRegInfo().addLiveOut(ARM::R2);
+      DAG.getMachineFunction().getRegInfo().addLiveOut(ARM::R3);
+    }
+    break;
+      
   }
 
   //We must use RET_FLAG instead of BRIND because BRIND doesn't have a flag





More information about the llvm-commits mailing list