mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 23:32:27 +00:00
Make more helper methods into static functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188366 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8971717313
commit
35e194fbad
@ -12087,7 +12087,7 @@ static SDValue LowerMUL(SDValue Op, const X86Subtarget *Subtarget,
|
||||
return DAG.getNode(ISD::ADD, dl, VT, Res, AhiBlo);
|
||||
}
|
||||
|
||||
SDValue X86TargetLowering::LowerSDIV(SDValue Op, SelectionDAG &DAG) const {
|
||||
static SDValue LowerSDIV(SDValue Op, SelectionDAG &DAG) {
|
||||
EVT VT = Op.getValueType();
|
||||
EVT EltTy = VT.getVectorElementType();
|
||||
unsigned NumElts = VT.getVectorNumElements();
|
||||
@ -12434,7 +12434,8 @@ static SDValue LowerScalarVariableShift(SDValue Op, SelectionDAG &DAG,
|
||||
return SDValue();
|
||||
}
|
||||
|
||||
SDValue X86TargetLowering::LowerShift(SDValue Op, SelectionDAG &DAG) const {
|
||||
static SDValue LowerShift(SDValue Op, const X86Subtarget* Subtarget,
|
||||
SelectionDAG &DAG) {
|
||||
|
||||
EVT VT = Op.getValueType();
|
||||
SDLoc dl(Op);
|
||||
@ -12792,9 +12793,10 @@ static SDValue LowerREADCYCLECOUNTER(SDValue Op, const X86Subtarget *Subtarget,
|
||||
return DAG.getMergeValues(Ops, array_lengthof(Ops), dl);
|
||||
}
|
||||
|
||||
SDValue X86TargetLowering::LowerBITCAST(SDValue Op, SelectionDAG &DAG) const {
|
||||
EVT SrcVT = Op.getOperand(0).getValueType();
|
||||
EVT DstVT = Op.getValueType();
|
||||
static SDValue LowerBITCAST(SDValue Op, const X86Subtarget *Subtarget,
|
||||
SelectionDAG &DAG) {
|
||||
MVT SrcVT = Op.getOperand(0).getValueType().getSimpleVT();
|
||||
MVT DstVT = Op.getValueType().getSimpleVT();
|
||||
assert(Subtarget->is64Bit() && !Subtarget->hasSSE2() &&
|
||||
Subtarget->hasMMX() && "Unexpected custom BITCAST");
|
||||
assert((DstVT == MVT::i64 ||
|
||||
@ -12879,7 +12881,8 @@ static SDValue LowerADDC_ADDE_SUBC_SUBE(SDValue Op, SelectionDAG &DAG) {
|
||||
Op.getOperand(1), Op.getOperand(2));
|
||||
}
|
||||
|
||||
SDValue X86TargetLowering::LowerFSINCOS(SDValue Op, SelectionDAG &DAG) const {
|
||||
static SDValue LowerFSINCOS(SDValue Op, const X86Subtarget *Subtarget,
|
||||
SelectionDAG &DAG) {
|
||||
assert(Subtarget->isTargetDarwin() && Subtarget->is64Bit());
|
||||
|
||||
// For MacOSX, we want to call an alternative entry point: __sincos_stret,
|
||||
@ -12890,8 +12893,8 @@ SDValue X86TargetLowering::LowerFSINCOS(SDValue Op, SelectionDAG &DAG) const {
|
||||
EVT ArgVT = Arg.getValueType();
|
||||
Type *ArgTy = ArgVT.getTypeForEVT(*DAG.getContext());
|
||||
|
||||
ArgListTy Args;
|
||||
ArgListEntry Entry;
|
||||
TargetLowering::ArgListTy Args;
|
||||
TargetLowering::ArgListEntry Entry;
|
||||
|
||||
Entry.Node = Arg;
|
||||
Entry.Ty = ArgTy;
|
||||
@ -12904,7 +12907,8 @@ SDValue X86TargetLowering::LowerFSINCOS(SDValue Op, SelectionDAG &DAG) const {
|
||||
// the small struct {f32, f32} is returned in (eax, edx). For f64,
|
||||
// the results are returned via SRet in memory.
|
||||
const char *LibcallName = isF64 ? "__sincos_stret" : "__sincosf_stret";
|
||||
SDValue Callee = DAG.getExternalSymbol(LibcallName, getPointerTy());
|
||||
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
|
||||
SDValue Callee = DAG.getExternalSymbol(LibcallName, TLI.getPointerTy());
|
||||
|
||||
Type *RetTy = isF64
|
||||
? (Type*)StructType::get(ArgTy, ArgTy, NULL)
|
||||
@ -12915,7 +12919,7 @@ SDValue X86TargetLowering::LowerFSINCOS(SDValue Op, SelectionDAG &DAG) const {
|
||||
CallingConv::C, /*isTaillCall=*/false,
|
||||
/*doesNotRet=*/false, /*isReturnValueUsed*/true,
|
||||
Callee, Args, DAG, dl);
|
||||
std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);
|
||||
std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI);
|
||||
|
||||
if (isF64)
|
||||
// Returned in xmm0 and xmm1.
|
||||
@ -12995,7 +12999,7 @@ SDValue X86TargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const {
|
||||
case ISD::MUL: return LowerMUL(Op, Subtarget, DAG);
|
||||
case ISD::SRA:
|
||||
case ISD::SRL:
|
||||
case ISD::SHL: return LowerShift(Op, DAG);
|
||||
case ISD::SHL: return LowerShift(Op, Subtarget, DAG);
|
||||
case ISD::SADDO:
|
||||
case ISD::UADDO:
|
||||
case ISD::SSUBO:
|
||||
@ -13003,7 +13007,7 @@ SDValue X86TargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const {
|
||||
case ISD::SMULO:
|
||||
case ISD::UMULO: return LowerXALUO(Op, DAG);
|
||||
case ISD::READCYCLECOUNTER: return LowerREADCYCLECOUNTER(Op, Subtarget,DAG);
|
||||
case ISD::BITCAST: return LowerBITCAST(Op, DAG);
|
||||
case ISD::BITCAST: return LowerBITCAST(Op, Subtarget, DAG);
|
||||
case ISD::ADDC:
|
||||
case ISD::ADDE:
|
||||
case ISD::SUBC:
|
||||
@ -13011,7 +13015,7 @@ SDValue X86TargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const {
|
||||
case ISD::ADD: return LowerADD(Op, DAG);
|
||||
case ISD::SUB: return LowerSUB(Op, DAG);
|
||||
case ISD::SDIV: return LowerSDIV(Op, DAG);
|
||||
case ISD::FSINCOS: return LowerFSINCOS(Op, DAG);
|
||||
case ISD::FSINCOS: return LowerFSINCOS(Op, Subtarget, DAG);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -854,7 +854,6 @@ namespace llvm {
|
||||
SDValue LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerExternalSymbol(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerShiftParts(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerBITCAST(SDValue op, SelectionDAG &DAG) const;
|
||||
SDValue LowerSINT_TO_FP(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerUINT_TO_FP(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerUINT_TO_FP_i64(SDValue Op, SelectionDAG &DAG) const;
|
||||
@ -889,10 +888,7 @@ namespace llvm {
|
||||
SDValue lowerEH_SJLJ_LONGJMP(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerINIT_TRAMPOLINE(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerFLT_ROUNDS_(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerShift(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerSDIV(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerSIGN_EXTEND_INREG(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerFSINCOS(SDValue Op, SelectionDAG &DAG) const;
|
||||
|
||||
virtual SDValue
|
||||
LowerFormalArguments(SDValue Chain,
|
||||
|
Loading…
x
Reference in New Issue
Block a user