]>
Commit | Line | Data |
---|---|---|
c63539ff ML |
1 | .. |
2 | Copyright 1988-2022 Free Software Foundation, Inc. | |
3 | This is part of the GCC manual. | |
4 | For copying conditions, see the copyright.rst file. | |
5 | ||
6 | .. _c-sky-function-attributes: | |
7 | ||
8 | C-SKY Function Attributes | |
9 | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
10 | ||
11 | These function attributes are supported by the C-SKY back end: | |
12 | ||
13 | .. index:: interrupt function attribute, C-SKY, isr function attribute, C-SKY | |
14 | ||
15 | .. c-sky-fn-attr:: interrupt, isr | |
16 | ||
17 | Use these attributes to indicate that the specified function | |
18 | is an interrupt handler. | |
19 | The compiler generates function entry and exit sequences suitable for | |
20 | use in an interrupt handler when either of these attributes are present. | |
21 | ||
22 | Use of these options requires the :option:`-mistack` command-line option | |
23 | to enable support for the necessary interrupt stack instructions. They | |
24 | are ignored with a warning otherwise. See :ref:`c-sky-options`. | |
25 | ||
26 | .. index:: naked function attribute, C-SKY | |
27 | ||
28 | .. c-sky-fn-attr:: naked | |
29 | ||
30 | This attribute allows the compiler to construct the | |
31 | requisite function declaration, while allowing the body of the | |
32 | function to be assembly code. The specified function will not have | |
33 | prologue/epilogue sequences generated by the compiler. Only basic | |
34 | ``asm`` statements can safely be included in naked functions | |
35 | (see :ref:`basic-asm`). While using extended ``asm`` or a mixture of | |
36 | basic ``asm`` and C code may appear to work, they cannot be | |
3ed1b4ce | 37 | depended upon to work reliably and are not supported. |