[LLVMdev] overriding InitLibcallNames?

reed kotler rkotler at mips.com
Thu Dec 6 20:30:39 PST 2012


I need to implement something akin to soft float for mips 16 in order to 
implement mips 16 hard float (current llvm mips16 is all soft float).

Mips 16 mode does not have floating point instructions but mips16 is a 
mode and there is still a mips32 (or mips64) processor present so you 
can in essence do soft float but them implement
the soft float using mips32 hard float. It's easy to switch between 
mips16 and mips32 functions.

This is how gcc mips16 works and there is already  this kind of soft 
float library  that is implemented as hard float mips32 functions.

Basically it is soft float but with different library entry names.

So for example, instead of   Names[RTLIB::MUL_F32] = "__mulsf3";

I would want Names[RTLIB::MUL_F32] = "__mips16__mulsf3";

I'm trying to think of the best way to do this since soft float is not 
done in target independent
code but this is a target dependent version of soft float.

I'll need to override a whole set of names and mips 16 hard float will 
behave like soft float
except for the difference in these names.

I'm hoping that it all maps one to one (i.e it's as simple as changing 
the names) because otherwise
there will be further leakage into the target independent code to solve 
all of this. Casual inspection
says that it is basically just a remapping of library names.

To do full mips16 fp so it can integrate seamlessly with mips32 fp there 
is more to do but this should at least allow me to pass all of 
test-suite if everything is compiled with mips16.

Reed






More information about the llvm-dev mailing list