]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/doc/gcc/extensions-to-the-c-language-family/declaring-attributes-of-functions/microblaze-function-attributes.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / doc / gcc / extensions-to-the-c-language-family / declaring-attributes-of-functions / microblaze-function-attributes.rst
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 .. _microblaze-function-attributes:
7
8 MicroBlaze Function Attributes
9 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10
11 These function attributes are supported on MicroBlaze targets:
12
13 .. index:: save_volatiles function attribute, MicroBlaze
14
15 .. microblaze-fn-attr:: save_volatiles
16
17 Use this attribute to indicate that the function is
18 an interrupt handler. All volatile registers (in addition to non-volatile
19 registers) are saved in the function prologue. If the function is a leaf
20 function, only volatiles used by the function are saved. A normal function
21 return is generated instead of a return from interrupt.
22
23 .. index:: break_handler function attribute, MicroBlaze, break handler functions
24
25 .. microblaze-fn-attr:: break_handler
26
27 Use this attribute to indicate that
28 the specified function is a break handler. The compiler generates function
29 entry and exit sequences suitable for use in an break handler when this
30 attribute is present. The return from :microblaze-fn-attr:`break_handler` is done through
31 the ``rtbd`` instead of ``rtsd``.
32
33 .. code-block:: c++
34
35 void f () __attribute__ ((break_handler));
36
37 .. index:: interrupt_handler function attribute, MicroBlaze, fast_interrupt function attribute, MicroBlaze
38
39 .. microblaze-fn-attr:: interrupt_handler, fast_interrupt
40
41 These attributes indicate that the specified function is an interrupt
42 handler. Use the :microblaze-fn-attr:`fast_interrupt` attribute to indicate handlers
43 used in low-latency interrupt mode, and :microblaze-fn-attr:`interrupt_handler` for
44 interrupts that do not use low-latency handlers. In both cases, GCC
45 emits appropriate prologue code and generates a return from the handler
46 using ``rtid`` instead of ``rtsd``.