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.
6 .. _microblaze-function-attributes:
8 MicroBlaze Function Attributes
9 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 These function attributes are supported on MicroBlaze targets:
13 .. index:: save_volatiles function attribute, MicroBlaze
15 .. microblaze-fn-attr:: save_volatiles
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.
23 .. index:: break_handler function attribute, MicroBlaze, break handler functions
25 .. microblaze-fn-attr:: break_handler
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``.
35 void f () __attribute__ ((break_handler));
37 .. index:: interrupt_handler function attribute, MicroBlaze, fast_interrupt function attribute, MicroBlaze
39 .. microblaze-fn-attr:: interrupt_handler, fast_interrupt
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``.