[llvm-commits] [llvm] r55898 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Anton Korobeynikov
asl at math.spbu.ru
Mon Sep 8 07:21:11 PDT 2008
Author: asl
Date: Mon Sep 8 09:21:10 2008
New Revision: 55898
URL: http://llvm.org/viewvc/llvm-project?rev=55898&view=rev
Log:
Implement FRAME_TO_ARGS_OFFSET for x86-64
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=55898&r1=55897&r2=55898&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Sep 8 09:21:10 2008
@@ -258,8 +258,7 @@
}
// 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 @@
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 @@
// 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)
More information about the llvm-commits
mailing list