[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcAsmPrinter.cpp SparcISelDAGToDAG.cpp

Nate Begeman natebegeman at mac.com
Sat Apr 22 11:54:07 PDT 2006



Changes in directory llvm/lib/Target/Sparc:

SparcAsmPrinter.cpp updated: 1.57 -> 1.58
SparcISelDAGToDAG.cpp updated: 1.91 -> 1.92
---
Log message:

JumpTable support!  What this represents is working asm and jit support for
x86 and ppc for 100% dense switch statements when relocations are non-PIC.
This support will be extended and enhanced in the coming days to support
PIC, and less dense forms of jump tables.


---
Diffs of the changes:  (+3 -6)

 SparcAsmPrinter.cpp   |    8 ++------
 SparcISelDAGToDAG.cpp |    1 +
 2 files changed, 3 insertions(+), 6 deletions(-)


Index: llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
diff -u llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.57 llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.58
--- llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.57	Thu Mar  9 00:14:35 2006
+++ llvm/lib/Target/Sparc/SparcAsmPrinter.cpp	Sat Apr 22 13:53:45 2006
@@ -163,13 +163,9 @@
   case MachineOperand::MO_UnextendedImmed:
     O << (int)MO.getImmedValue();
     break;
-  case MachineOperand::MO_MachineBasicBlock: {
-    MachineBasicBlock *MBBOp = MO.getMachineBasicBlock();
-    O << ".LBB" << Mang->getValueName(MBBOp->getParent()->getFunction())
-      << "_" << MBBOp->getNumber () << "\t! "
-      << MBBOp->getBasicBlock ()->getName ();
+  case MachineOperand::MO_MachineBasicBlock:
+    printBasicBlockLabel(MO.getMachineBasicBlock());
     return;
-  }
   case MachineOperand::MO_PCRelativeDisp:
     std::cerr << "Shouldn't use addPCDisp() when building Sparc MachineInstrs";
     abort ();


Index: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
diff -u llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.91 llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.92
--- llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.91	Sun Mar 26 19:32:24 2006
+++ llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp	Sat Apr 22 13:53:45 2006
@@ -167,6 +167,7 @@
   
   // Sparc doesn't have BRCOND either, it has BR_CC.
   setOperationAction(ISD::BRCOND, MVT::Other, Expand);
+  setOperationAction(ISD::BRIND, MVT::i32, Expand);
   setOperationAction(ISD::BR_CC, MVT::i32, Custom);
   setOperationAction(ISD::BR_CC, MVT::f32, Custom);
   setOperationAction(ISD::BR_CC, MVT::f64, Custom);






More information about the llvm-commits mailing list