aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-09-08 21:12:11 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-09-08 21:12:11 +0000
commit260a6b8f85f4c9a8af34aae97ecbe8b0f28e0758 (patch)
treedd2d5faa12df7eee0668ee5dac8bd8fcf9348e07
parenta8657e3587eb71eb920c4f0d7d4baa58f33a277d (diff)
downloadexternal_llvm-260a6b8f85f4c9a8af34aae97ecbe8b0f28e0758.zip
external_llvm-260a6b8f85f4c9a8af34aae97ecbe8b0f28e0758.tar.gz
external_llvm-260a6b8f85f4c9a8af34aae97ecbe8b0f28e0758.tar.bz2
Reapply blindly reverted 55898: Implement FRAME_TO_ARGS_OFFSET for x86-64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55954 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index 26895bb..93ffb41 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -258,8 +258,7 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
}
// X86 ret instruction may pop stack.
setOperationAction(ISD::RET , MVT::Other, Custom);
- if (!Subtarget->is64Bit())
- setOperationAction(ISD::EH_RETURN , MVT::Other, Custom);
+ setOperationAction(ISD::EH_RETURN , MVT::Other, Custom);
// Darwin ABI issue.
setOperationAction(ISD::ConstantPool , MVT::i32 , Custom);
@@ -325,7 +324,8 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
setExceptionSelectorRegister(X86::EDX);
}
setOperationAction(ISD::FRAME_TO_ARGS_OFFSET, MVT::i32, Custom);
-
+ setOperationAction(ISD::FRAME_TO_ARGS_OFFSET, MVT::i64, Custom);
+
setOperationAction(ISD::TRAMPOLINE, MVT::Other, Custom);
setOperationAction(ISD::TRAP, MVT::Other, Legal);
@@ -5593,19 +5593,15 @@ SDValue X86TargetLowering::LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) {
// Depths > 0 not supported yet!
if (cast<ConstantSDNode>(Op.getOperand(0))->getValue() > 0)
return SDValue();
-
+
SDValue RetAddrFI = getReturnAddressFrameIndex(DAG);
- return DAG.getNode(ISD::SUB, getPointerTy(), RetAddrFI,
+ return DAG.getNode(ISD::SUB, getPointerTy(), RetAddrFI,
DAG.getIntPtrConstant(!Subtarget->is64Bit() ? 4 : 8));
}
SDValue X86TargetLowering::LowerFRAME_TO_ARGS_OFFSET(SDValue Op,
- SelectionDAG &DAG) {
- // Is not yet supported on x86-64
- if (Subtarget->is64Bit())
- return SDValue();
-
- return DAG.getIntPtrConstant(8);
+ SelectionDAG &DAG) {
+ return DAG.getIntPtrConstant(Subtarget->is64Bit() ? 16 : 8);
}
SDValue X86TargetLowering::LowerEH_RETURN(SDValue Op, SelectionDAG &DAG)