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
This commit is contained in:
Anton Korobeynikov 2008-09-08 21:12:11 +00:00
parent a8657e3587
commit 260a6b8f85

View File

@ -258,7 +258,6 @@ 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);
// Darwin ABI issue.
@ -325,6 +324,7 @@ 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);
@ -5601,11 +5601,7 @@ SDValue X86TargetLowering::LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) {
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);
return DAG.getIntPtrConstant(Subtarget->is64Bit() ? 16 : 8);
}
SDValue X86TargetLowering::LowerEH_RETURN(SDValue Op, SelectionDAG &DAG)