Usage Notes and Known Design Exceptions to Functional Specifications
31
SPRZ412K – December 2013 – Revised February 2020
Copyright © 2013–2020, Texas Instruments Incorporated
TMS320F2837xD Dual-Core MCUs Silicon Revisions C, B, A, 0
NOTES:
NOTES ON COMPILER AND TOOLS USAGE
The compiler does not use LVF/LUF as condition codes for conditional
instructions and neither does the Run Time Support (RTS) Library test
LVF/LUF in any way.
The compiler may generate code that modifies LVF/LUF, meaning the
value of the STF register (that contain these flags) is undefined at
function boundaries. Thus, although the sqrt routine in the library may
cause LVF/LUF to be set, there is no assurance in the CGT that the user
can read these bits after sqrt returns.
Although the compiler does provide the __eisqrtf and __einvf32 intrinsics,
it does not provide an intrinsic to read the LVF/LUF bits or the STF
register. Thus, the user has no way to access these bits from C code.
The use of inline assembly code to read the STF register is unreliable
and is discouraged. The workaround presented in the Workaround(s)
section is applicable to assembly code that uses the EISQRTF32 and
EINVF32 instructions and does not call any compiler-generated code. For
C code, the user must consider these flags to be unreliable, and
therefore, neither poll these flags in code nor trigger interrupts off of
them.