]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/doc/gcc/gcc-command-options/machine-dependent-options/c-sky-options.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / doc / gcc / gcc-command-options / machine-dependent-options / c-sky-options.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 .. program:: C-SKY
7
8 .. index:: C-SKY Options
9
10 .. _c-sky-options:
11
12 C-SKY Options
13 ^^^^^^^^^^^^^
14
15 GCC supports these options when compiling for C-SKY V2 processors.
16
17 .. option:: -march={arch}
18
19 Specify the C-SKY target architecture. Valid values for :samp:`{arch}` are:
20 :samp:`ck801`, :samp:`ck802`, :samp:`ck803`, :samp:`ck807`, and :samp:`ck810`.
21 The default is :samp:`ck810`.
22
23 .. option:: -mcpu={cpu}
24
25 Specify the C-SKY target processor. Valid values for :samp:`{cpu}` are:
26 :samp:`ck801`, :samp:`ck801t`,
27 :samp:`ck802`, :samp:`ck802t`, :samp:`ck802j`,
28 :samp:`ck803`, :samp:`ck803h`, :samp:`ck803t`, :samp:`ck803ht`,
29 :samp:`ck803f`, :samp:`ck803fh`, :samp:`ck803e`, :samp:`ck803eh`,
30 :samp:`ck803et`, :samp:`ck803eht`, :samp:`ck803ef`, :samp:`ck803efh`,
31 :samp:`ck803ft`, :samp:`ck803eft`, :samp:`ck803efht`, :samp:`ck803r1`,
32 :samp:`ck803hr1`, :samp:`ck803tr1`, :samp:`ck803htr1`, :samp:`ck803fr1`,
33 :samp:`ck803fhr1`, :samp:`ck803er1`, :samp:`ck803ehr1`, :samp:`ck803etr1`,
34 :samp:`ck803ehtr1`, :samp:`ck803efr1`, :samp:`ck803efhr1`, :samp:`ck803ftr1`,
35 :samp:`ck803eftr1`, :samp:`ck803efhtr1`,
36 :samp:`ck803s`, :samp:`ck803st`, :samp:`ck803se`, :samp:`ck803sf`,
37 :samp:`ck803sef`, :samp:`ck803seft`,
38 :samp:`ck807e`, :samp:`ck807ef`, :samp:`ck807`, :samp:`ck807f`,
39 :samp:`ck810e`, :samp:`ck810et`, :samp:`ck810ef`, :samp:`ck810eft`,
40 :samp:`ck810`, :samp:`ck810v`, :samp:`ck810f`, :samp:`ck810t`, :samp:`ck810fv`,
41 :samp:`ck810tv`, :samp:`ck810ft`, and :samp:`ck810ftv`.
42
43 .. option:: -mbig-endian, -EB, -mlittle-endian, -EL
44
45 Select big- or little-endian code. The default is little-endian.
46
47 .. option:: -mfloat-abi={name}
48
49 Specifies which floating-point ABI to use. Permissible values
50 are: :samp:`soft`, :samp:`softfp` and :samp:`hard`.
51
52 Specifying :samp:`soft` causes GCC to generate output containing
53 library calls for floating-point operations.
54 :samp:`softfp` allows the generation of code using hardware floating-point
55 instructions, but still uses the soft-float calling conventions.
56 :samp:`hard` allows generation of floating-point instructions
57 and uses FPU-specific calling conventions.
58
59 The default depends on the specific target configuration. Note that
60 the hard-float and soft-float ABIs are not link-compatible; you must
61 compile your entire program with the same ABI, and link with a
62 compatible set of libraries.
63
64 .. option:: -mhard-float, -msoft-float
65
66 Select hardware or software floating-point implementations.
67 The default is soft float.
68
69 .. option:: -mdouble-float, -mno-double-float
70
71 When :option:`-mhard-float` is in effect, enable generation of
72 double-precision float instructions. This is the default except
73 when compiling for CK803.
74
75 .. option:: -mfdivdu, -mno-fdivdu
76
77 When :option:`-mhard-float` is in effect, enable generation of
78 ``frecipd``, ``fsqrtd``, and ``fdivd`` instructions.
79 This is the default except when compiling for CK803.
80
81 .. option:: -mfpu={fpu}
82
83 Select the floating-point processor. This option can only be used with
84 :option:`-mhard-float`.
85 Values for :samp:`{fpu}` are
86 :samp:`fpv2_sf` (equivalent to :samp:`-mno-double-float -mno-fdivdu`),
87 :samp:`fpv2` (:samp:`-mdouble-float -mno-divdu`), and
88 :samp:`fpv2_divd` (:samp:`-mdouble-float -mdivdu`).
89
90 .. option:: -melrw, -mno-elrw
91
92 Enable the extended ``lrw`` instruction. This option defaults to on
93 for CK801 and off otherwise.
94
95 .. option:: -mistack, -mno-istack
96
97 Enable interrupt stack instructions; the default is off.
98
99 The :option:`-mistack` option is required to handle the
100 :c-sky-fn-attr:`interrupt` and :c-sky-fn-attr:`isr` function attributes
101 (see :ref:`c-sky-function-attributes`).
102
103 .. option:: -mmp
104
105 Enable multiprocessor instructions; the default is off.
106
107 .. option:: -mcp
108
109 Enable coprocessor instructions; the default is off.
110
111 .. option:: -mcache
112
113 Enable coprocessor instructions; the default is off.
114
115 .. option:: -msecurity
116
117 Enable C-SKY security instructions; the default is off.
118
119 .. option:: -mtrust
120
121 Enable C-SKY trust instructions; the default is off.
122
123 .. option:: -mdsp, -medsp, -mvdsp
124
125 Enable C-SKY DSP, Enhanced DSP, or Vector DSP instructions, respectively.
126 All of these options default to off.
127
128 .. option:: -mdiv, -mno-div
129
130 Generate divide instructions. Default is off.
131
132 .. option:: -msmart, -mno-smart
133
134 Generate code for Smart Mode, using only registers numbered 0-7 to allow
135 use of 16-bit instructions. This option is ignored for CK801 where this
136 is the required behavior, and it defaults to on for CK802.
137 For other targets, the default is off.
138
139 .. option:: -mhigh-registers, -mno-high-registers
140
141 Generate code using the high registers numbered 16-31. This option
142 is not supported on CK801, CK802, or CK803, and is enabled by default
143 for other processors.
144
145 .. option:: -manchor, -mno-anchor
146
147 Generate code using global anchor symbol addresses.
148
149 .. option:: -mpushpop, -mno-pushpop
150
151 Generate code using ``push`` and ``pop`` instructions. This option
152 defaults to on.
153
154 .. option:: -mmultiple-stld, -mstm, -mno-multiple-stld, -mno-stm
155
156 Generate code using ``stm`` and ``ldm`` instructions. This option
157 isn't supported on CK801 but is enabled by default on other processors.
158
159 .. option:: -mconstpool, -mno-constpool
160
161 Create constant pools in the compiler instead of deferring it to the
162 assembler. This option is the default and required for correct code
163 generation on CK801 and CK802, and is optional on other processors.
164
165 .. option:: -mstack-size, -mno-stack-size
166
167 Emit ``.stack_size`` directives for each function in the assembly
168 output. This option defaults to off.
169
170 .. option:: -mstack-size
171
172 Default setting; overrides :option:`-mno-stack-size`.
173
174 .. option:: -mccrt, -mno-ccrt
175
176 Generate code for the C-SKY compiler runtime instead of libgcc. This
177 option defaults to off.
178
179 .. option:: -mbranch-cost={n}
180
181 Set the branch costs to roughly ``n`` instructions. The default is 1.
182
183 .. option:: -msched-prolog, -mno-sched-prolog
184
185 Permit scheduling of function prologue and epilogue sequences. Using
186 this option can result in code that is not compliant with the C-SKY V2 ABI
187 prologue requirements and that cannot be debugged or backtraced.
188 It is disabled by default.
189
190 .. option:: -msim
191
192 Links the library libsemi.a which is in compatible with simulator. Applicable
193 to ELF compiler only.