The following built-in functions are provided for ARC targets. The built-ins generate the corresponding assembly instructions. In the examples given below, the generated code often requires an operand or result to be in a register. Where necessary further code will be generated to ensure this is true, but for brevity this is not described in each case.
Note: Using a built-in to generate an instruction not supported by a target may cause problems. At present the compiler is not guaranteed to detect such misuse, and as a result an internal compiler error may be generated.
Return 1 if val is known to have the byte alignment given by alignval, otherwise return 0. Note that this is different from
because __alignof__ sees only the type of the dereference, whereas __builtin_arc_align uses alignment information from the pointer as well as from the pointed-to type. The information available will depend on optimization level.
Generates
The operand is the number of a register to be read. Generates:
where the value in dest will be the result returned from the built-in.
The first operand is the number of a register to be written, the second operand is a compile time constant to write into that register. Generates:
Only available if either -mcpu=ARC700 or -meA is set. Generates:
where the value in dest will be the result returned from the built-in.
Generates
The operand, auxv, is the address of an auxiliary register and must be a compile time constant. Generates:
Where the value in dest will be the result returned from the built-in.
Only available with -mmul64. Generates:
Only available with -mmul64. Generates:
Generates:
Only valid if the ‘norm’ instruction is available through the -mnorm option or by default with -mcpu=ARC700. Generates:
Where the value in dest will be the result returned from the built-in.
Only valid if the ‘normw’ instruction is available through the -mnorm option or by default with -mcpu=ARC700. Generates:
Where the value in dest will be the result returned from the built-in.
Generates:
Generates:
The first argument, val, is a compile time constant to be written to the register, the second argument, auxr, is the address of an auxiliary register. Generates:
Only valid with -mswap. Generates:
Where the value in dest will be the result returned from the built-in.
Generates:
Only available with -mcpu=ARC700. Generates:
Only available with -mcpu=ARC700. Generates:
Only available with -mcpu=ARC700. Generates:
The instructions generated by the following builtins are not considered as candidates for scheduling. They are not moved around by the compiler during scheduling, and thus can be expected to appear where they are put in the C code:
__builtin_arc_brk() __builtin_arc_core_read() __builtin_arc_core_write() __builtin_arc_flag() __builtin_arc_lr() __builtin_arc_sleep() __builtin_arc_sr() __builtin_arc_swi()
Next: ARC SIMD Built-in Functions, Previous: Altera Nios II Built-in Functions, Up: Target Builtins [Contents][Index]
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/ARC-Built-in-Functions.html