gcc: ARC Function Attributes
1
1 6.31.3 ARC Function Attributes
1 ------------------------------
1
1 These function attributes are supported by the ARC back end:
1
1 'interrupt'
1 Use this attribute to indicate that the specified function is an
1 interrupt handler. The compiler generates function entry and exit
1 sequences suitable for use in an interrupt handler when this
1 attribute is present.
1
1 On the ARC, you must specify the kind of interrupt to be handled in
1 a parameter to the interrupt attribute like this:
1
1 void f () __attribute__ ((interrupt ("ilink1")));
1
1 Permissible values for this parameter are: 'ilink1' and 'ilink2'.
1
1 'long_call'
1 'medium_call'
1 'short_call'
1 These attributes specify how a particular function is called.
1 These attributes override the '-mlong-calls' and '-mmedium-calls'
1 (⇒ARC Options) command-line switches and '#pragma
1 long_calls' settings.
1
1 For ARC, a function marked with the 'long_call' attribute is always
1 called using register-indirect jump-and-link instructions, thereby
1 enabling the called function to be placed anywhere within the
1 32-bit address space. A function marked with the 'medium_call'
1 attribute will always be close enough to be called with an
1 unconditional branch-and-link instruction, which has a 25-bit
1 offset from the call site. A function marked with the 'short_call'
1 attribute will always be close enough to be called with a
1 conditional branch-and-link instruction, which has a 21-bit offset
1 from the call site.
1
1 'jli_always'
1 Forces a particular function to be called using 'jli' instruction.
1 The 'jli' instruction makes use of a table stored into '.jlitab'
1 section, which holds the location of the functions which are
1 addressed using this instruction.
1
1 'jli_fixed'
1 Identical like the above one, but the location of the function in
1 the 'jli' table is known and given as an attribute parameter.
1
1 'secure_call'
1 This attribute allows one to mark secure-code functions that are
1 callable from normal mode. The location of the secure call
1 function into the 'sjli' table needs to be passed as argument.
1