Next:ARM Function Attributes, Previous:AMD GCN Function Attributes, Up:Declaring Attributes of Functions [Contents][Index]
These function attributes are supported by the ARC back end:
interrupt ¶Use this attribute to indicatethat the specified function is an interrupt handler. The compiler generatesfunction entry and exit sequences suitable for use in an interrupt handlerwhen this attribute is present.
On the ARC, you must specify the kind of interrupt to be handledin a parameter to the interrupt attribute like this:
void f () __attribute__ ((interrupt ("ilink1")));Permissible values for this parameter are:ilink1 andilink2 for ARCv1 architecture, andilink andfirq for ARCv2 architecture.
long_call ¶medium_callshort_callThese attributes specify how a particular function is called.These attributes override the-mlong-calls and-mmedium-calls (seeARC Options)command-line switches and#pragma long_calls settings.
For ARC, a function marked with thelong_call attribute isalways called using register-indirect jump-and-link instructions,thereby enabling the called function to be placed anywhere within the32-bit address space. A function marked with themedium_callattribute will always be close enough to be called with an unconditionalbranch-and-link instruction, which has a 25-bit offset fromthe call site. A function marked with theshort_callattribute will always be close enough to be called with a conditionalbranch-and-link instruction, which has a 21-bit offset fromthe call site.
jli_always ¶Forces a particular function to be called usingjliinstruction. Thejli instruction makes use of a table storedinto.jlitab section, which holds the location of the functionswhich are addressed using this instruction.
jli_fixed ¶Identical like the above one, but the location of the function in thejli table is known and given as an attribute parameter.
secure_call ¶This attribute allows one to mark secure-code functions that arecallable from normal mode. The location of the secure call functioninto thesjli table needs to be passed as argument.
naked ¶This attribute allows the compiler to construct the requisite functiondeclaration, while allowing the body of the function to be assemblycode. The specified function will not have prologue/epiloguesequences generated by the compiler. Only basicasm statementscan safely be included in naked functions (seeBasic Asm — Assembler Instructions Without Operands). Whileusing extendedasm or a mixture of basicasm and C codemay appear to work, they cannot be depended upon to work reliably andare not supported.
Next:ARM Function Attributes, Previous:AMD GCN Function Attributes, Up:Declaring Attributes of Functions [Contents][Index]