parent
811dd8d009
commit
9ea1b3f9fd
|
@ -3435,14 +3435,11 @@ SDOperand SelectionDAGLegalize::ExpandLegalINT_TO_FP(bool isSigned,
|
||||||
// word offset constant for Hi/Lo address computation
|
// word offset constant for Hi/Lo address computation
|
||||||
SDOperand WordOff = DAG.getConstant(sizeof(int), TLI.getPointerTy());
|
SDOperand WordOff = DAG.getConstant(sizeof(int), TLI.getPointerTy());
|
||||||
// set up Hi and Lo (into buffer) address based on endian
|
// set up Hi and Lo (into buffer) address based on endian
|
||||||
SDOperand Hi, Lo;
|
SDOperand Hi = StackSlot;
|
||||||
if (TLI.isLittleEndian()) {
|
SDOperand Lo = DAG.getNode(ISD::ADD, TLI.getPointerTy(), StackSlot,WordOff);
|
||||||
Hi = DAG.getNode(ISD::ADD, TLI.getPointerTy(), StackSlot, WordOff);
|
if (TLI.isLittleEndian())
|
||||||
Lo = StackSlot;
|
std::swap(Hi, Lo);
|
||||||
} else {
|
|
||||||
Hi = StackSlot;
|
|
||||||
Lo = DAG.getNode(ISD::ADD, TLI.getPointerTy(), StackSlot, WordOff);
|
|
||||||
}
|
|
||||||
// if signed map to unsigned space
|
// if signed map to unsigned space
|
||||||
SDOperand Op0Mapped;
|
SDOperand Op0Mapped;
|
||||||
if (isSigned) {
|
if (isSigned) {
|
||||||
|
|
Loading…
Reference in New Issue