mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
SelectNodeTo now returns its result, we must pay attention to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24550 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -289,8 +289,7 @@ SDOperand X86DAGToDAGISel::Select(SDOperand Op) {
|
|||||||
case MVT::i32: Opc = X86::ADD32rr; break;
|
case MVT::i32: Opc = X86::ADD32rr; break;
|
||||||
}
|
}
|
||||||
SDOperand Tmp0 = Select(N->getOperand(0));
|
SDOperand Tmp0 = Select(N->getOperand(0));
|
||||||
CurDAG->SelectNodeTo(N, Opc, MVT::i32, Tmp0, Tmp0);
|
return CurDAG->SelectNodeTo(N, Opc, MVT::i32, Tmp0, Tmp0);
|
||||||
return SDOperand(N, 0);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
static const unsigned SHLTab[] = {
|
static const unsigned SHLTab[] = {
|
||||||
@@ -319,8 +318,7 @@ SDOperand X86DAGToDAGISel::Select(SDOperand Op) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SDOperand Tmp0 = Select(N->getOperand(0));
|
SDOperand Tmp0 = Select(N->getOperand(0));
|
||||||
CurDAG->SelectNodeTo(N, Opc, MVT::i32, Tmp0);
|
return CurDAG->SelectNodeTo(N, Opc, MVT::i32, Tmp0);
|
||||||
return SDOperand(N, 0);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -350,13 +348,11 @@ SDOperand X86DAGToDAGISel::Select(SDOperand Op) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (X86Lowering.getBytesToPopOnReturn() == 0)
|
if (X86Lowering.getBytesToPopOnReturn() == 0)
|
||||||
CurDAG->SelectNodeTo(N, X86::RET, MVT::Other, Chain);
|
return CurDAG->SelectNodeTo(N, X86::RET, MVT::Other, Chain);
|
||||||
else
|
else
|
||||||
CurDAG->SelectNodeTo(N, X86::RET, MVT::Other,
|
return CurDAG->SelectNodeTo(N, X86::RET, MVT::Other,
|
||||||
getI16Imm(X86Lowering.getBytesToPopOnReturn()),
|
getI16Imm(X86Lowering.getBytesToPopOnReturn()),
|
||||||
Chain);
|
Chain);
|
||||||
|
|
||||||
return SDOperand(N, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case ISD::LOAD: {
|
case ISD::LOAD: {
|
||||||
@@ -385,15 +381,17 @@ SDOperand X86DAGToDAGISel::Select(SDOperand Op) {
|
|||||||
? CurDAG->getTargetGlobalAddress(AM.GV, MVT::i32, AM.Disp)
|
? CurDAG->getTargetGlobalAddress(AM.GV, MVT::i32, AM.Disp)
|
||||||
: getI32Imm(AM.Disp);
|
: getI32Imm(AM.Disp);
|
||||||
if (AM.BaseType == X86ISelAddressMode::RegBase) {
|
if (AM.BaseType == X86ISelAddressMode::RegBase) {
|
||||||
CurDAG->SelectNodeTo(N, Opc, OpVT, MVT::Other,
|
return CurDAG->SelectNodeTo(N, Opc, OpVT, MVT::Other,
|
||||||
AM.Base.Reg, Scale, AM.IndexReg, Disp, Chain);
|
AM.Base.Reg, Scale, AM.IndexReg, Disp,
|
||||||
|
Chain)
|
||||||
|
.getValue(Op.ResNo);
|
||||||
} else {
|
} else {
|
||||||
SDOperand Base = CurDAG->getFrameIndex(AM.Base.FrameIndex, MVT::i32);
|
SDOperand Base = CurDAG->getFrameIndex(AM.Base.FrameIndex, MVT::i32);
|
||||||
CurDAG->SelectNodeTo(N, Opc, OpVT, MVT::Other,
|
return CurDAG->SelectNodeTo(N, Opc, OpVT, MVT::Other,
|
||||||
Base, Scale, AM.IndexReg, Disp, Chain);
|
Base, Scale, AM.IndexReg, Disp, Chain)
|
||||||
|
.getValue(Op.ResNo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return SDOperand(N, Op.ResNo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case ISD::STORE: {
|
case ISD::STORE: {
|
||||||
@@ -430,13 +428,13 @@ SDOperand X86DAGToDAGISel::Select(SDOperand Op) {
|
|||||||
? CurDAG->getTargetGlobalAddress(AM.GV, MVT::i32, AM.Disp)
|
? CurDAG->getTargetGlobalAddress(AM.GV, MVT::i32, AM.Disp)
|
||||||
: getI32Imm(AM.Disp);
|
: getI32Imm(AM.Disp);
|
||||||
if (AM.BaseType == X86ISelAddressMode::RegBase) {
|
if (AM.BaseType == X86ISelAddressMode::RegBase) {
|
||||||
CurDAG->SelectNodeTo(N, Opc, MVT::Other,
|
return CurDAG->SelectNodeTo(N, Opc, MVT::Other,
|
||||||
AM.Base.Reg, Scale, AM.IndexReg, Disp, Tmp1,
|
AM.Base.Reg, Scale, AM.IndexReg, Disp, Tmp1,
|
||||||
Chain);
|
Chain);
|
||||||
} else {
|
} else {
|
||||||
SDOperand Base = CurDAG->getFrameIndex(AM.Base.FrameIndex, MVT::i32);
|
SDOperand Base = CurDAG->getFrameIndex(AM.Base.FrameIndex, MVT::i32);
|
||||||
CurDAG->SelectNodeTo(N, Opc, MVT::Other,
|
return CurDAG->SelectNodeTo(N, Opc, MVT::Other,
|
||||||
Base, Scale, AM.IndexReg, Disp, Tmp1, Chain);
|
Base, Scale, AM.IndexReg, Disp, Tmp1, Chain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user