[LLVMdev] How to pick default floating point ABI?
Daniel Sanders
Daniel.Sanders at imgtec.com
Tue Jun 16 06:10:20 PDT 2015
You forgot to include the compiler command but I believe I've spotted the problem anyway. The problem is that the compiler isn't aware that it needs to avoid using the odd-numbered single-precision registers on Mips2 because (at the time) they weren't intended to be usable in this way. The GNU assembler does know this and warns about it.
You should be able to work around this with –mno-odd-spreg for now. This option forbids the use of odd-numbered FPU registers for single precision values. Could you file a bug report at llvm.org/bugs so that we fix this at some point?
From: Weitian Leung [mailto:weitianleung at gmail.com]
Sent: 16 June 2015 13:34
To: Daniel Sanders; llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] How to pick default floating point ABI?
On 06/16/2015 06:21 PM, Daniel Sanders wrote:
> > the best I can suggest is to target mips2 and O32
> > It's not work for all, still get Assembler messages error on some source files
>
> Warning: float register should be even, was 7
Could you add –save-temps to the compiler command and send me the command along with the .i and .s file the compiler produces?
This warning is usually related to something called FPXX. FPXX is an extension to the O32 ABI that causes the compiler to generate objects that can be used on both a 32-bit and 64-bit FPU. In recent compilers it is enabled by default. The most likely cause of the warning is some inline assembly that doesn't obey the small restrictions that FPXX enforces. Assuming, this is the cause –mfp32/-mfp64 should provide a work around but I'd recommend updating the inline assembly since this will make it easier to port to newer Mips processors.
Just tested with xercesc v3, got these warnings (sorry I said error message in last reply)
DOMNodeIDMap.s:134: Warning: float register should be even, was 1
DOMNodeIDMap.s:134: Warning: float register should be even, was 1
DOMNodeIDMap.s:136: Warning: float register should be even, was 1
DOMNodeIDMap.s:141: Warning: float register should be even, was 1
DOMNodeIDMap.s:148: Warning: float register should be even, was 1
DOMNodeIDMap.s:758: Warning: float register should be even, was 1
DOMNodeIDMap.s:758: Warning: float register should be even, was 1
DOMNodeIDMap.s:759: Warning: float register should be even, was 1
DOMNodeIDMap.s:764: Warning: float register should be even, was 1
DOMNodeIDMap.s:771: Warning: float register should be even, was 1
Hope this helps.
--
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150616/dd23680d/attachment.html>
More information about the llvm-dev
mailing list