[LLVMdev] mips16 hard float puzzle
reed kotler
rkotler at mips.com
Tue Jan 8 18:33:51 PST 2013
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?
There may be some special handling needed for functions which fall under
visitUnaryFloatCall
and maybe some other cases.
More information about the llvm-dev
mailing list