X86 PIC JIT support fixes: encoding bugs, add lazy pointer stubs support.
[oota-llvm.git] / lib / Target / X86 / X86ISelLowering.h
index 2921f7b8c80f75e5c118f23a4e5ad281fd5ff578..bcfab641fd08cb45ada17b196ce3899a3dcb52ea 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by Chris Lattner and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -28,6 +28,11 @@ namespace llvm {
       // Start the numbering where the builtin ops leave off.
       FIRST_NUMBER = ISD::BUILTIN_OP_END+X86::INSTRUCTION_LIST_END,
 
+      /// BSF - Bit scan forward.
+      /// BSR - Bit scan reverse.
+      BSF,
+      BSR,
+
       /// SHLD, SHRD - Double shift instructions. These correspond to
       /// X86::SHLDxx and X86::SHRDxx instructions.
       SHLD,
@@ -188,7 +193,10 @@ namespace llvm {
       //   operand #1 callee (register or absolute)
       //   operand #2 stack adjustment
       //   operand #3 optional in flag
-      TC_RETURN
+      TC_RETURN,
+
+      // Store FP control world into i16 memory
+      FNSTCW16m
     };
   }
 
@@ -318,6 +326,12 @@ namespace llvm {
     ///
     virtual SDOperand LowerOperation(SDOperand Op, SelectionDAG &DAG);
 
+    /// ExpandOperation - Custom lower the specified operation, splitting the
+    /// value into two pieces.
+    ///
+    virtual SDNode *ExpandOperationResult(SDNode *N, SelectionDAG &DAG);
+
+    
     virtual SDOperand PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const;
 
     virtual MachineBasicBlock *InsertAtEndOfBasicBlock(MachineInstr *MI,
@@ -441,6 +455,9 @@ namespace llvm {
     SDOperand LowerFastCCArguments(SDOperand Op, SelectionDAG &DAG);
     SDOperand LowerFastCCCallTo(SDOperand Op, SelectionDAG &DAG, unsigned CC);
 
+    std::pair<SDOperand,SDOperand> FP_TO_SINTHelper(SDOperand Op, 
+                                                    SelectionDAG &DAG);
+    
     SDOperand LowerBUILD_VECTOR(SDOperand Op, SelectionDAG &DAG);
     SDOperand LowerVECTOR_SHUFFLE(SDOperand Op, SelectionDAG &DAG);
     SDOperand LowerEXTRACT_VECTOR_ELT(SDOperand Op, SelectionDAG &DAG);
@@ -468,7 +485,6 @@ namespace llvm {
     SDOperand LowerRET(SDOperand Op, SelectionDAG &DAG);
     SDOperand LowerDYNAMIC_STACKALLOC(SDOperand Op, SelectionDAG &DAG);
     SDOperand LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG);
-    SDOperand LowerREADCYCLCECOUNTER(SDOperand Op, SelectionDAG &DAG);
     SDOperand LowerVASTART(SDOperand Op, SelectionDAG &DAG);
     SDOperand LowerVACOPY(SDOperand Op, SelectionDAG &DAG);
     SDOperand LowerINTRINSIC_WO_CHAIN(SDOperand Op, SelectionDAG &DAG);
@@ -477,6 +493,11 @@ namespace llvm {
     SDOperand LowerFRAME_TO_ARGS_OFFSET(SDOperand Op, SelectionDAG &DAG);
     SDOperand LowerEH_RETURN(SDOperand Op, SelectionDAG &DAG);
     SDOperand LowerTRAMPOLINE(SDOperand Op, SelectionDAG &DAG);
+    SDOperand LowerFLT_ROUNDS(SDOperand Op, SelectionDAG &DAG);
+    SDOperand LowerCTLZ(SDOperand Op, SelectionDAG &DAG);
+    SDOperand LowerCTTZ(SDOperand Op, SelectionDAG &DAG);
+    SDNode *ExpandFP_TO_SINT(SDNode *N, SelectionDAG &DAG);
+    SDNode *ExpandREADCYCLECOUNTER(SDNode *N, SelectionDAG &DAG);
   };
 }