Everything

-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)

-

__sincosfx [V3.05.00 or later]

-

__sinfx [V.05.00 or later]

-

__cosfx [V3.05.00 or later]

-

__atan2fx [V3.05.00 or later]

-

__hypotfx [V3.05.00 or later]

-

__atan2hypotfx [V3.05.00 or later]

 

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

-

asinf *2 / asin *1*2 / asinl *1*2 [V3.02.00 or later]

-

acosf *2 / acos *1*2 / acosl *1*2 [V3.02.00 or later]

-

atanf / atan *1 / atanl *1 [V3.02.00 or later]

-

tanf / tan *1 / tanl *1 [V3.02.00 or later]

 

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

*2: This is the case when -isa=rxv2|rxv3 and -fpu are specified.

 

-

[V3.05.00 or later] When -tfu_version=v2 is specified at the same time, interrupt specifications tfu and no_tfu specified in #pragma interrupt are available.

[Remarks]

-

[Earlier than V3.05.00] Code for operations that use the trigonometric function unit is not reentrant.

-

[V3.05.00 or later] Code for operations that use the trigonometric function unit is not reentrant if -tfu_version=v1 is specified. When -tfu_version=v2 is specified, the default code is reentrant. However, it is not reentrant if any of the following applies:

-

When -nosave_tfu is specified. For details, refer to the description of -nosave_tfu in section 2.5.1 Compile Options.

-

When interrupt specification no_tfu is specified in #pragma interrupt for any interrupt function that uses the trigonometric function unit. For details, refer to the description of #pragma interrupt in section 4.2.3 #pragma Directive.

-

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.

-

When TFUv1 is used, 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.

-

When TFUv2 is used, there is no need to initialize the trigonometric function unit. Calling the __init_tfu intrinsic function causes an error.

-

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