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 .. _nios-ii-function-attributes:
8 Nios II Function Attributes
9 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 These function attributes are supported by the Nios II back end:
13 .. index:: target function attribute
15 .. nios-ii-fn-attr:: target (options)
17 As discussed in :ref:`common-function-attributes`, this attribute
18 allows specification of target-specific compilation options.
20 When compiling for Nios II, the following options are allowed:
22 :samp:`custom-{insn}={N}` :samp:`no-custom-{insn}`
24 .. index:: target("custom-insn=N") function attribute, Nios II, target("no-custom-insn") function attribute, Nios II
26 Each :samp:`custom-{insn}={N}` attribute locally enables use of a
27 custom instruction with encoding :samp:`{N}` when generating code that uses
28 :samp:`{insn}`. Similarly, :samp:`no-custom-{insn}` locally inhibits use of
29 the custom instruction :samp:`{insn}`.
30 These target attributes correspond to the
31 :option:`-mcustom-insn=N` and :option:`-mno-custom-insn`
32 command-line options, and support the same set of :samp:`{insn}` keywords.
33 See :ref:`nios-ii-options`, for more information.
35 :samp:`custom-fpu-cfg={name}`
37 .. index:: target("custom-fpu-cfg=name") function attribute, Nios II
39 This attribute corresponds to the :option:`-mcustom-fpu-cfg=name`
40 command-line option, to select a predefined set of custom instructions
42 See :ref:`nios-ii-options`, for more information.