]> git.ipfire.org Git - thirdparty/gcc.git/blob
7fb489e04cbc5dd150cca57e3dbe9f89983bba0d
[thirdparty/gcc.git] /
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 .. _m32r-d-function-attributes:
7
8 M32R/D Function Attributes
9 ^^^^^^^^^^^^^^^^^^^^^^^^^^
10
11 These function attributes are supported by the M32R/D back end:
12
13 .. index:: interrupt function attribute, M32R/D
14
15 .. m32r-d-fn-attr:: interrupt
16
17 Use this attribute to indicate
18 that the specified function is an interrupt handler. The compiler generates
19 function entry and exit sequences suitable for use in an interrupt handler
20 when this attribute is present.
21
22 .. index:: model function attribute, M32R/D, function addressability on the M32R/D
23
24 .. m32r-d-fn-attr:: model (model-name)
25
26 On the M32R/D, use this attribute to set the addressability of an
27 object, and of the code generated for a function. The identifier
28 :samp:`{model-name}` is one of ``small``, ``medium``, or
29 ``large``, representing each of the code models.
30
31 Small model objects live in the lower 16MB of memory (so that their
32 addresses can be loaded with the ``ld24`` instruction), and are
33 callable with the ``bl`` instruction.
34
35 Medium model objects may live anywhere in the 32-bit address space (the
36 compiler generates ``seth/add3`` instructions to load their addresses),
37 and are callable with the ``bl`` instruction.
38
39 Large model objects may live anywhere in the 32-bit address space (the
40 compiler generates ``seth/add3`` instructions to load their addresses),
41 and may not be reachable with the ``bl`` instruction (the compiler
42 generates the much slower ``seth/add3/jl`` instruction sequence).