mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Implement Promote for VAARG, and allow it to be custom promoted for people
who don't want the default behavior (Alpha). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25726 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -141,6 +141,7 @@ AlphaTargetLowering::AlphaTargetLowering(TargetMachine &TM) : TargetLowering(TM)
|
||||
setOperationAction(ISD::VAEND, MVT::Other, Expand);
|
||||
setOperationAction(ISD::VACOPY, MVT::Other, Custom);
|
||||
setOperationAction(ISD::VAARG, MVT::Other, Custom);
|
||||
setOperationAction(ISD::VAARG, MVT::i32, Custom);
|
||||
|
||||
setStackPointerRegisterToSaveRestore(Alpha::R30);
|
||||
|
||||
@@ -691,3 +692,13 @@ SDOperand AlphaTargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
|
||||
|
||||
return SDOperand();
|
||||
}
|
||||
|
||||
SDOperand AlphaTargetLowering::CustomPromoteOperation(SDOperand Op,
|
||||
SelectionDAG &DAG) {
|
||||
assert(Op.getValueType() == MVT::i32 &&
|
||||
Op.getOpcode() == ISD::VAARG &&
|
||||
"Unknown node to custom promote!");
|
||||
|
||||
// The code in LowerOperation already handles i32 vaarg
|
||||
return LowerOperation(Op, DAG);
|
||||
}
|
||||
|
Reference in New Issue
Block a user