-tfu [V3.01.00 or later]


< Compile Options / Optimize Options >

[Format]

-tfu=intrinsic[,mathlib]

[Description]

-

When -tfu=intrinsic is specified, the following intrinsic functions which use the trigonometric function unit are available.

 

-

__sincosf

-

__atan2hypotf

-

__init_tfu (for initialization)

 

For details on the listed intrinsic functions, refer to section 4.2.6 Intrinsic Functions.

 

-

When -tfu=intrinsic,mathlib is specified, the above intrinsic functions are available and calls of relevant mathematics library functions are replaced with code that uses the trigonometric function unit. The following are the mathematics library functions to be replaced.

 

-

sinf / sin*1 / sinl*1

-

cosf / cos*1 / cosl*1

-

atan2f / atan2*1 / atan2l*1

-

hypotf / hypot*1 / hypotl*1

 

*1: This is only the case when -dbl_size=4 is specified.

[Remarks]

-

Code for operations that use the trigonometric function unit is not reentrant.

-

When -tfu=intrinsic,mathlib is specified, replacement of the mathematics library functions means that only code from the relevant function calls is replaced and code in the library is not affected. Accordingly, if an indirect call via a pointer is made, the trigonometric function unit will not be used.

-

If calls of mathematics library functions are replaced with code that uses the trigonometric function unit, the values of variable errno will not be modified.

-

Use or non-use of the trigonometric function unit affects the precision of operations.

-

Before using the trigonometric function unit, initialize the unit from the startup program by calling the __init_tfu() intrinsic function. If you do not do so, correct operation is not guaranteed.

-

Do not specify this option for a device that does not include a trigonometric function unit.