]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/doc/gcc/extensions-to-the-c-language-family/declaring-attributes-of-functions/blackfin-function-attributes.rst
sphinx: copy files from texi2rst-generated repository
[thirdparty/gcc.git] / gcc / doc / gcc / extensions-to-the-c-language-family / declaring-attributes-of-functions / blackfin-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 .. _blackfin-function-attributes:
7
8 Blackfin Function Attributes
9 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10
11 These function attributes are supported by the Blackfin back end:
12
13 .. index:: exception_handler function attribute, exception handler functions, Blackfin
14
15 .. blackfin-fn-attr:: exception_handler
16
17 Use this attribute on the Blackfin to indicate that the specified function
18 is an exception handler. The compiler generates function entry and
19 exit sequences suitable for use in an exception handler when this
20 attribute is present.
21
22 .. index:: interrupt_handler function attribute, Blackfin
23
24 .. blackfin-fn-attr:: interrupt_handler
25
26 Use this attribute to
27 indicate that the specified function is an interrupt handler. The compiler
28 generates function entry and exit sequences suitable for use in an
29 interrupt handler when this attribute is present.
30
31 .. index:: kspisusp function attribute, Blackfin, User stack pointer in interrupts on the Blackfin
32
33 .. blackfin-fn-attr:: kspisusp
34
35 When used together with :blackfin-fn-attr:`interrupt_handler`, :blackfin-fn-attr:`exception_handler`
36 or :blackfin-fn-attr:`nmi_handler`, code is generated to load the stack pointer
37 from the USP register in the function prologue.
38
39 .. index:: l1_text function attribute, Blackfin
40
41 .. blackfin-fn-attr:: l1_text
42
43 This attribute specifies a function to be placed into L1 Instruction
44 SRAM. The function is put into a specific section named ``.l1.text``.
45 With :option:`-mfdpic`, function calls with a such function as the callee
46 or caller uses inlined PLT.
47
48 .. index:: l2 function attribute, Blackfin
49
50 .. blackfin-fn-attr:: l2
51
52 This attribute specifies a function to be placed into L2
53 SRAM. The function is put into a specific section named
54 ``.l2.text``. With :option:`-mfdpic`, callers of such functions use
55 an inlined PLT.
56
57 .. index:: indirect calls, Blackfin, longcall function attribute, Blackfin, shortcall function attribute, Blackfin
58
59 .. blackfin-fn-attr:: longcall, shortcall
60
61 The :blackfin-fn-attr:`longcall` attribute
62 indicates that the function might be far away from the call site and
63 require a different (more expensive) calling sequence. The
64 ``shortcall`` attribute indicates that the function is always close
65 enough for the shorter calling sequence to be used. These attributes
66 override the :option:`-mlongcall` switch.
67
68 .. index:: nesting function attribute, Blackfin, Allow nesting in an interrupt handler on the Blackfin processor
69
70 .. blackfin-fn-attr:: nesting
71
72 Use this attribute together with :blackfin-fn-attr:`interrupt_handler`,
73 :blackfin-fn-attr:`exception_handler` or :blackfin-fn-attr:`nmi_handler` to indicate that the function
74 entry code should enable nested interrupts or exceptions.
75
76 .. index:: nmi_handler function attribute, Blackfin, NMI handler functions on the Blackfin processor
77
78 .. blackfin-fn-attr:: nmi_handler
79
80 Use this attribute on the Blackfin to indicate that the specified function
81 is an NMI handler. The compiler generates function entry and
82 exit sequences suitable for use in an NMI handler when this
83 attribute is present.
84
85 .. index:: saveall function attribute, Blackfin, save all registers on the Blackfin
86
87 .. blackfin-fn-attr:: saveall
88
89 Use this attribute to indicate that
90 all registers except the stack pointer should be saved in the prologue
91 regardless of whether they are used or not.