Other Parts Discussed in Thread: MATHLIB, , OMAP-L138
- I will attach a ZIP file of a simple CCS project that demonstrates this bug.
- CCS version: 7.3.0
- C6000 compiler version: 8.2.1
- MATHLIB_RTS_C66X version: 3.1.2.1 (http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mathlib/latest/index_FDS.html)
The main.c file in my CCS project is as follows:
#include <math.h>
void main(void)
{
// This function call will not return.
float result = fmodf((float)90.0, (float)45.0);
// This divide is here simply to cause divsp to be linked from mathlib_rts.ae66.
// If you comment out this line, mathlib_rts.ae66 will not be used, and the fmodf() call will return.
float test = result / (float)1.0;
}
I have found that the fmodf function from the RTS library (C:\ti\ccsv7\tools\compiler\ti-cgt-c6000_8.2.1\lib\rts6600_elf.lib) will never return when certain arguments are provided to the function. I have only seen this happen when the return value of the function would be zero (i.e., the remainder of the division is zero). I have not seen this happen when the __c6xabi_divf function from the RTS library is linked into the executable -- I have only seen it happen when the divsp function from the MATHLIB_RTS library overrides the __c6xabi_divf function. Perhaps it has something to do with the precision of the MATHLIB division function versus that of the RTS library division function.
I'm hoping that TI can reproduce this using my CCS project and confirm whether or not there is a workaround for the bug. Thank you in advance for your assistance.
Best regards,
Dave