Changes in directory llvm/lib/Target/Alpha:

AlphaISelLowering.cpp updated: 1.61 -> 1.62
AlphaTargetAsmInfo.cpp updated: 1.1 -> 1.2
AlphaTargetMachine.cpp updated: 1.32 -> 1.33
---
Log message:

Fix jump tables to match gcc (and the ABI and whatnot)

---
Diffs of the changes:  (+7 -0)

 AlphaISelLowering.cpp  |    4 ++++
 AlphaTargetAsmInfo.cpp |    2 ++
 AlphaTargetMachine.cpp |    1 +
 3 files changed, 7 insertions(+)


Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.61 
llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.62
--- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.61    Mon Sep 18 13:01:03 2006
+++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Sun Sep 24 14:46:56 2006
@@ -129,6 +129,8 @@
   setOperationAction(ISD::RET,     MVT::Other, Custom);
 
   setOperationAction(ISD::JumpTable, MVT::i64, Custom);
+  setOperationAction(ISD::JumpTable, MVT::i32, Custom);
+  setOperationAction(ISD::JumpTableRelocBase, MVT::i64, Custom);
 
   setStackPointerRegisterToSaveRestore(Alpha::R30);
 
@@ -412,6 +414,8 @@
                                                           GP, RA);
   case ISD::RET: return LowerRET(Op,DAG, getVRegRA());
   case ISD::JumpTable: return LowerJumpTable(Op, DAG);
+  case ISD::JumpTableRelocBase: 
+    return DAG.getNode(AlphaISD::GlobalBaseReg, MVT::i64);
 
   case ISD::SINT_TO_FP: {
     assert(MVT::i64 == Op.getOperand(0).getValueType() && 


Index: llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
diff -u llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cpp:1.1 
llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cpp:1.2
--- llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cpp:1.1    Thu Sep  7 17:05:02 2006
+++ llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cpp        Sun Sep 24 14:46:56 2006
@@ -18,4 +18,6 @@
 AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM) {
   AlignmentIsInBytes = false;
   PrivateGlobalPrefix = "$";
+  JumpTableDirective = ".gprel32";
+  JumpTableTextSection = "\t.section .rodata\n";
 }


Index: llvm/lib/Target/Alpha/AlphaTargetMachine.cpp
diff -u llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.32 
llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.33
--- llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.32   Mon Sep 18 14:44:29 2006
+++ llvm/lib/Target/Alpha/AlphaTargetMachine.cpp        Sun Sep 24 14:46:56 2006
@@ -59,6 +59,7 @@
     FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0),
     JITInfo(*this),
     Subtarget(M, FS) {
+  setRelocationModel(Reloc::PIC_);
 }
 
 



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to