mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
[bpf] fix build
Patch by Brenden Blanco. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236030 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -56,9 +56,10 @@ private:
|
|||||||
// ComplexPattern used on BPF Load/Store instructions
|
// ComplexPattern used on BPF Load/Store instructions
|
||||||
bool BPFDAGToDAGISel::SelectAddr(SDValue Addr, SDValue &Base, SDValue &Offset) {
|
bool BPFDAGToDAGISel::SelectAddr(SDValue Addr, SDValue &Base, SDValue &Offset) {
|
||||||
// if Address is FI, get the TargetFrameIndex.
|
// if Address is FI, get the TargetFrameIndex.
|
||||||
|
SDLoc DL(Addr);
|
||||||
if (FrameIndexSDNode *FIN = dyn_cast<FrameIndexSDNode>(Addr)) {
|
if (FrameIndexSDNode *FIN = dyn_cast<FrameIndexSDNode>(Addr)) {
|
||||||
Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), MVT::i64);
|
Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), MVT::i64);
|
||||||
Offset = CurDAG->getTargetConstant(0, MVT::i64);
|
Offset = CurDAG->getTargetConstant(0, DL, MVT::i64);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,13 +79,13 @@ bool BPFDAGToDAGISel::SelectAddr(SDValue Addr, SDValue &Base, SDValue &Offset) {
|
|||||||
else
|
else
|
||||||
Base = Addr.getOperand(0);
|
Base = Addr.getOperand(0);
|
||||||
|
|
||||||
Offset = CurDAG->getTargetConstant(CN->getSExtValue(), MVT::i64);
|
Offset = CurDAG->getTargetConstant(CN->getSExtValue(), DL, MVT::i64);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Base = Addr;
|
Base = Addr;
|
||||||
Offset = CurDAG->getTargetConstant(0, MVT::i64);
|
Offset = CurDAG->getTargetConstant(0, DL, MVT::i64);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,7 +303,7 @@ SDValue BPFTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Chain = DAG.getCALLSEQ_START(
|
Chain = DAG.getCALLSEQ_START(
|
||||||
Chain, DAG.getConstant(NumBytes, getPointerTy(), true), CLI.DL);
|
Chain, DAG.getConstant(NumBytes, CLI.DL, getPointerTy(), true), CLI.DL);
|
||||||
|
|
||||||
SmallVector<std::pair<unsigned, SDValue>, 5> RegsToPass;
|
SmallVector<std::pair<unsigned, SDValue>, 5> RegsToPass;
|
||||||
|
|
||||||
@ -374,8 +374,8 @@ SDValue BPFTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
|
|||||||
|
|
||||||
// Create the CALLSEQ_END node.
|
// Create the CALLSEQ_END node.
|
||||||
Chain = DAG.getCALLSEQ_END(
|
Chain = DAG.getCALLSEQ_END(
|
||||||
Chain, DAG.getConstant(NumBytes, getPointerTy(), true),
|
Chain, DAG.getConstant(NumBytes, CLI.DL, getPointerTy(), true),
|
||||||
DAG.getConstant(0, getPointerTy(), true), InFlag, CLI.DL);
|
DAG.getConstant(0, CLI.DL, getPointerTy(), true), InFlag, CLI.DL);
|
||||||
InFlag = Chain.getValue(1);
|
InFlag = Chain.getValue(1);
|
||||||
|
|
||||||
// Handle result values, copying them out of physregs into vregs that we
|
// Handle result values, copying them out of physregs into vregs that we
|
||||||
@ -487,7 +487,7 @@ SDValue BPFTargetLowering::LowerBR_CC(SDValue Op, SelectionDAG &DAG) const {
|
|||||||
NegateCC(LHS, RHS, CC);
|
NegateCC(LHS, RHS, CC);
|
||||||
|
|
||||||
return DAG.getNode(BPFISD::BR_CC, DL, Op.getValueType(), Chain, LHS, RHS,
|
return DAG.getNode(BPFISD::BR_CC, DL, Op.getValueType(), Chain, LHS, RHS,
|
||||||
DAG.getConstant(CC, MVT::i64), Dest);
|
DAG.getConstant(CC, DL, MVT::i64), Dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDValue BPFTargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const {
|
SDValue BPFTargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const {
|
||||||
@ -500,7 +500,7 @@ SDValue BPFTargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const {
|
|||||||
|
|
||||||
NegateCC(LHS, RHS, CC);
|
NegateCC(LHS, RHS, CC);
|
||||||
|
|
||||||
SDValue TargetCC = DAG.getConstant(CC, MVT::i64);
|
SDValue TargetCC = DAG.getConstant(CC, DL, MVT::i64);
|
||||||
|
|
||||||
SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Glue);
|
SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Glue);
|
||||||
SDValue Ops[] = {LHS, RHS, TargetCC, TrueV, FalseV};
|
SDValue Ops[] = {LHS, RHS, TargetCC, TrueV, FalseV};
|
||||||
|
Reference in New Issue
Block a user