-Xfar_jump


This option controls outputting far jump.

[Specification format]

-Xfar_jump=file

 

-

Interpretation when omitted

The instructions in accordance with the -Xcall_jump option are generated.

[Detailed description]

-

This option generates the code that uses instructions with a branch distance of 32 bits for the branch to functions specified in far jump calling function list file file.

-

".fjp" is recommended as the extension of file.

-

An error will occur if file does not exist.

-

An error will occur if file is omitted.

-

An error will occur at linkage if the distance between a branch instruction and a branch destination function exceeds 22 bits (±2 Mbytes) when the -Xcall_jump=22 option is specified. In this case, recompile by using this option.

-

If this option is specified more than once, the option specified last will be valid.

-

The example of the output code is shown below.

-

C source

far_func();     /* "jarl _far_func, lp" is output by default. */

 

-

Output assembly source

jarl32  _far_func, lp

 

Remark

Cautions about are the format of the far jump calling function list file as follows.

-

Describe with one function name per line.
If two or more function name is described, the first name will be valid.

-

Describe the function name (label name in an assembly source) by prefixing "_" to that in C language.
However, the following formats can be specified instead of function names.

Format

Meaning

{all_function}

All functions are called.

 

-

Rutime routines can be specified instead of functions.

-

A space and tab can be inserted before and after function names.

-

Only ASCII characters can be used.
After the space characters at the beginning of a line, a non-space character string until the next space character or the end of the line is treated as a function name, and the rest of the line (from the space character to the end of the line) is ignored.

-

Comments cannot be inserted.

-

Up to 1023 characters can be specified per line (including a space and tab).

 

The example when specifying functions is shown below.

_func_led
_func_beep
_func_motor
    :
_func_switch

[Example of use]

-

To generate the code that uses jmp directive to branch to the function specified in func.fjp, describe as:

>ccrh -Xfar_jump=func.fjp -Xcommon=rh850 main.c