[LLVMdev] mips16 hard float puzzle

Eli Friedman eli.friedman at gmail.com
Tue Jan 8 18:40:54 PST 2013


On Tue, Jan 8, 2013 at 6:33 PM, reed kotler <rkotler at mips.com> wrote:
> On 01/08/2013 01:48 PM, Eli Friedman wrote:
>>
>> On Mon, Jan 7, 2013 at 6:07 PM, reed kotler <rkotler at mips.com> wrote:
>>>
>>> For example:
>>>
>>> /home/rkotler/llvm/install/bin/llc -mcpu=mips16 hf16_2.ll -march=mipsel
>>> -relocation-model=pic -o hf16_2.s -O3 -mips16-hard-float -soft-float
>>
>> Try something like the following:
>>
>> float f;
>> double test(void* fptr) {
>>    f = ((float(*)(float,float))fptr)(1.0, 1.0);
>> }
>>
>> -Eli
>
> It seems that in SelectionDAGBuilder::visitCall, that I.getCalledFunction()
> has the correct protoype,
> even for this case you give. (This case you give is not constructable as you
> pointed out simply using the DAG in Mips lower call).
>
> So it seems possible to add an additional parameter to LowerCallTo and pass
> it down the chain
> until Mips lower call is invoked.
>
> Is this more or less what you had in mind?

That's the right idea... but as far as I can tell, it's already part
of the CallLoweringInfo structure.

-Eli



More information about the llvm-dev mailing list