This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
We've worked around this erratum in the linker
GCC at present only outputs scalar code for VFP units, so the default (pre-ARMv7 architectures) is to fix scalar code. The workaround can be disabled or selected for vector operations using the linker options:
--vfp11-denorm-fix={none,scalar,vector}
The workaround works by scanning input code sections for potentially-troublesome code sequences, and replacing them by branches to a specially-constructed veneer (similar to the way ARM<->Thumb interworking stubs are created at link-time). The veneer contains the original instruction plus a branch back to the original subsequent instruction, which is sufficient to avoid the erratum in either scalar or vector mode.
Tested with cross to arm-none-eabi, and also with the GCC testsuite (C/C++/libstdc++) with -mfpu=vfp/-mfloat-abi=softfp.
+ /* Information about a VFP11 erratum veneer, or a branch to such a veneer. + The type can be: + 'a': branch to ARM veneer + 't': branch to Thumb veneer + 'A': ARM veneer + 'T': Thumb veneer. */
+ char type;
+ /* Return a VFP register number.
+ /* Look for potentially-troublesome code sequences which might trigger the
+ VFP11 denormal/antidependency erratum. See, e.g., the ARM1136 errata sheet
+ (available from ARM)
+ can trigger if an instruction uses denorm operands (bouncing to support
+ code), and a subsequent instruction overwrites one of those operands.
+ In some circumstances, the second instruction can be issued before the
+ first is handled, leading to incorrect results.
+ + We can work around the erratum by replacing (at link time) the first
+ instruction with a branch to a veneer containing the original instruction
+ and a branch back to the following instruction. The erratum is avoided if:
+ + * In scalar mode, there is one unrelated instruction between the bouncing
+ instruction and the instruction which overwrites its operands.
+ + * In vector mode, if there are two unrelated instructions between the
+ first and second instructions.
+ + The erratum is only relevant in full IEEE compatibility mode, but we can't
+ tell if that is needed at this point by ourselves. If you know you don't
+ need the workaround, pass --vfp11-denorm-fix=none to the linker. */
Cheers Nick
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |