[llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp

Nate Begeman natebegeman at mac.com
Wed Jul 26 20:13:24 CDT 2006



Changes in directory llvm/lib/Target/X86:

X86ATTAsmPrinter.cpp updated: 1.54 -> 1.55
X86AsmPrinter.cpp updated: 1.189 -> 1.190
---
Log message:

Support jump tables when in PIC relocation model


---
Diffs of the changes:  (+4 -2)

 X86ATTAsmPrinter.cpp |    4 +++-
 X86AsmPrinter.cpp    |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.54 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.55
--- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.54	Wed Jul 26 16:12:04 2006
+++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp	Wed Jul 26 20:13:04 2006
@@ -143,7 +143,9 @@
     if (!isMemOp) O << '$';
     O << PrivateGlobalPrefix << "JTI" << getFunctionNumber() << "_"
       << MO.getJumpTableIndex();
-    // FIXME: PIC relocation model
+    if (Subtarget->TargetType == X86Subtarget::isDarwin && 
+        TM.getRelocationModel() == Reloc::PIC_)
+      O << "-\"L" << getFunctionNumber() << "$pb\"";
     return;
   }
   case MachineOperand::MO_ConstantPoolIndex: {


Index: llvm/lib/Target/X86/X86AsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.189 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.190
--- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.189	Fri Jul 14 18:05:05 2006
+++ llvm/lib/Target/X86/X86AsmPrinter.cpp	Wed Jul 26 20:13:04 2006
@@ -62,7 +62,7 @@
     ZeroDirective = "\t.space\t";  // ".space N" emits N zeros.
     PrivateGlobalPrefix = "L";     // Marker for constant pool idxs
     ConstantPoolSection = "\t.const\n";
-    JumpTableSection = "\t.const\n"; // FIXME: depends on PIC mode
+    JumpTableDataSection = "\t.const\n"; // FIXME: depends on PIC mode
     FourByteConstantSection = "\t.literal4\n";
     EightByteConstantSection = "\t.literal8\n";
     LCOMMDirective = "\t.lcomm\t";






More information about the llvm-commits mailing list