[MIPS] Avoiding FP operations/register usage

Matthew Fortune Matthew.Fortune@imgtec.com
Fri Feb 7 14:45:00 GMT 2014


Hi Richard,

I've been trying to determine for some time whether the MIPS backend has successfully guaranteed that even when compiling with hard-float enabled there is no floating point code emitted unless you use floating point types.

My most recent reason for looking at this is because I am starting to understand/look at mips ld.so from glibc and it appears to make such an assumption. I.e. I cannot see it using any specific options to prevent the use of floating point but the path into the dynamic linker for resolving symbols only preserves integer argument registers and ignores floating point. I have to therefore assume that the MIPS backend manages to avoid what I thought was a common problem of using floating point registers as integer scratch in extreme circumstances.

An another example of where this issue is relevant is the MIPS linux kernel which explicitly compiles for soft-float, whether this is out of caution or necessity I do not know but I'm interested to figure it out.

Any insight into this would be welcome. If there is no such guarantee (which is what I have assumed thus far) then I will go ahead fix anything that relies on avoiding floating point code.

Regards,
Matthew 



More information about the Gcc mailing list