Thumb opcodes for thumb calls.
authorEric Christopher <echristo@apple.com>
Sat, 18 Sep 2010 02:32:38 +0000 (02:32 +0000)
committerEric Christopher <echristo@apple.com>
Sat, 18 Sep 2010 02:32:38 +0000 (02:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114263 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMFastISel.cpp

index 5701542d8bc3a0e173988a460420509785f85846..d199e7327469fe5078747bc2ee5de47d413e98b2 100644 (file)
@@ -1100,7 +1100,11 @@ bool ARMFastISel::ARMEmitLibcall(const Instruction *I, Function *F) {
   
   // Issue the call, BLr9 for darwin, BL otherwise.
   MachineInstrBuilder MIB;
-  unsigned CallOpc = Subtarget->isTargetDarwin() ? ARM::BLr9 : ARM::BL;
+  unsigned CallOpc;
+  if(isThumb)
+    CallOpc = Subtarget->isTargetDarwin() ? ARM::tBLr9 : ARM::tBL;
+  else
+    CallOpc = Subtarget->isTargetDarwin() ? ARM::BLr9 : ARM::BL;
   MIB = BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(CallOpc))
         .addGlobalAddress(F, 0, 0);