diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2006-09-24 19:45:58 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-09-24 19:45:58 +0000 |
commit | beec30eaf301bd6882cd06800b5175b94f033f9d (patch) | |
tree | c19a2eaf2fc2c57289099d0a93c8f5166b7564ea /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | b08659d2e55562a94a92593cc51f35f2229e65f3 (diff) |
Add support for other relocation bases to jump tables, as well as custom asm directives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30593 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index cf26eb2951..27a45a1d52 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -868,8 +868,9 @@ void SelectionDAGLowering::visitJumpTable(SelectionDAGISel::JumpTable &JT) { SDOperand LD = DAG.getLoad(isPIC ? MVT::i32 : PTy, Copy.getValue(1), ADD, DAG.getSrcValue(0)); if (isPIC) { + SDOperand Reloc = DAG.getNode(ISD::JumpTableRelocBase, PTy, TAB); ADD = DAG.getNode(ISD::ADD, PTy, - ((PTy != MVT::i32) ? DAG.getNode(ISD::SIGN_EXTEND, PTy, LD) : LD), TAB); + ((PTy != MVT::i32) ? DAG.getNode(ISD::SIGN_EXTEND, PTy, LD) : LD), Reloc); DAG.setRoot(DAG.getNode(ISD::BRIND, MVT::Other, LD.getValue(1), ADD)); } else { DAG.setRoot(DAG.getNode(ISD::BRIND, MVT::Other, LD.getValue(1), LD)); |