[llvm-commits] [llvm] r57926 - in /llvm/trunk/lib: CodeGen/SelectionDAG/LegalizeDAG.cpp Target/X86/X86ISelLowering.cpp Target/X86/X86ISelLowering.h
Dale Johannesen
dalej at apple.com
Tue Oct 21 15:08:15 PDT 2008
On Oct 21, 2008, at 2:58 PMPDT, Evan Cheng wrote:
>>
>> +SDValue X86TargetLowering::LowerUINT_TO_FP(SDValue Op, SelectionDAG
>> &DAG) {
>> + MVT SrcVT = Op.getOperand(0).getValueType();
>> + assert(SrcVT.getSimpleVT() == MVT::i64 && "Unknown UINT_TO_FP to
>> lower!");
>> +
>> + // We only handle SSE2 f64 target here; caller can handle the
>> rest.
>> + if (Op.getValueType() != MVT::f64 || !X86ScalarSSEf64)
>> + return SDValue();
>> +
>> + // Get a XMM-vector-sized stack slot.
>> + unsigned Size = 128/8;
>> + MachineFunction &MF = DAG.getMachineFunction();
>> + int SSFI = MF.getFrameInfo()->CreateStackObject(Size, Size);
>> + SDValue StackSlot = DAG.getFrameIndex(SSFI, getPointerTy());
>> +
>> + // Build some magic constants.
>
> Can you add comments describing the algorithm? I can't figure out
> what's going on here.
I was afraid somebody would ask for that:( I'll come up with something.
More information about the llvm-commits
mailing list