Hi folks,
I am doing some unit testing with a C28x project that uses the IQmathLib.
The unit tests are compiled and executed in the host environment (Ubuntu, or rather Windows Subsystem for Linux) using GCC.
For this use I have added a -D definition at the command line for the IQ MATH_TYPE to be equal to 1, i.e. FLOAT_MATH.
I think this is possibly not what the FLOAT_MATH was intended for, but rather for use if switching to using floating point on CLA. Is that correct?
My reason to ask is that I have found that the _IQsat() used for FLOAT_MATH uses C28x compiler intrinsics:
#define _IQsat(A, Pos, Neg) (__fmax(((__fmin((A),(Pos)))),(Neg)))
Resorting to using the commented out implementation does not help:
extern float _satf(float A, float Pos, float Neg); #define _IQsat(A, Pos, Neg) _satf(A, Pos, Neg)
Is _satf in this latter case also referencing some compiler intrinsic (I couldn't find mention of it in the C28x C/C++ compiler user's guide) or how is it intended to be used?
Thanks, T