]>
Commit | Line | Data |
---|---|---|
c63539ff ML |
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:: Blackfin | |
7 | ||
8 | .. index:: Blackfin Options | |
9 | ||
10 | .. _blackfin-options: | |
11 | ||
12 | Blackfin Options | |
13 | ^^^^^^^^^^^^^^^^ | |
14 | ||
15 | .. option:: -mcpu={cpu}[-{sirevision}] | |
16 | ||
17 | Specifies the name of the target Blackfin processor. Currently, :samp:`{cpu}` | |
18 | can be one of :samp:`bf512`, :samp:`bf514`, :samp:`bf516`, :samp:`bf518`, | |
19 | :samp:`bf522`, :samp:`bf523`, :samp:`bf524`, :samp:`bf525`, :samp:`bf526`, | |
20 | :samp:`bf527`, :samp:`bf531`, :samp:`bf532`, :samp:`bf533`, | |
21 | :samp:`bf534`, :samp:`bf536`, :samp:`bf537`, :samp:`bf538`, :samp:`bf539`, | |
22 | :samp:`bf542`, :samp:`bf544`, :samp:`bf547`, :samp:`bf548`, :samp:`bf549`, | |
23 | :samp:`bf542m`, :samp:`bf544m`, :samp:`bf547m`, :samp:`bf548m`, :samp:`bf549m`, | |
24 | :samp:`bf561`, :samp:`bf592`. | |
25 | ||
26 | The optional :samp:`{sirevision}` specifies the silicon revision of the target | |
27 | Blackfin processor. Any workarounds available for the targeted silicon revision | |
28 | are enabled. If :samp:`{sirevision}` is :samp:`none`, no workarounds are enabled. | |
29 | If :samp:`{sirevision}` is :samp:`any`, all workarounds for the targeted processor | |
30 | are enabled. The ``__SILICON_REVISION__`` macro is defined to two | |
31 | hexadecimal digits representing the major and minor numbers in the silicon | |
32 | revision. If :samp:`{sirevision}` is :samp:`none`, the ``__SILICON_REVISION__`` | |
33 | is not defined. If :samp:`{sirevision}` is :samp:`any`, the | |
34 | ``__SILICON_REVISION__`` is defined to be ``0xffff``. | |
35 | If this optional :samp:`{sirevision}` is not used, GCC assumes the latest known | |
36 | silicon revision of the targeted Blackfin processor. | |
37 | ||
38 | GCC defines a preprocessor macro for the specified :samp:`{cpu}`. | |
39 | For the :samp:`bfin-elf` toolchain, this option causes the hardware BSP | |
40 | provided by libgloss to be linked in if :option:`-msim` is not given. | |
41 | ||
42 | Without this option, :samp:`bf532` is used as the processor by default. | |
43 | ||
44 | Note that support for :samp:`bf561` is incomplete. For :samp:`bf561`, | |
45 | only the preprocessor macro is defined. | |
46 | ||
47 | .. option:: -msim | |
48 | ||
49 | Specifies that the program will be run on the simulator. This causes | |
50 | the simulator BSP provided by libgloss to be linked in. This option | |
51 | has effect only for :samp:`bfin-elf` toolchain. | |
52 | Certain other options, such as :option:`-mid-shared-library` and | |
53 | :option:`-mfdpic`, imply :option:`-msim`. | |
54 | ||
55 | .. option:: -momit-leaf-frame-pointer | |
56 | ||
57 | Don't keep the frame pointer in a register for leaf functions. This | |
58 | avoids the instructions to save, set up and restore frame pointers and | |
59 | makes an extra register available in leaf functions. | |
60 | ||
61 | .. option:: -mspecld-anomaly | |
62 | ||
63 | When enabled, the compiler ensures that the generated code does not | |
64 | contain speculative loads after jump instructions. If this option is used, | |
65 | ``__WORKAROUND_SPECULATIVE_LOADS`` is defined. | |
66 | ||
67 | .. option:: -mno-specld-anomaly | |
68 | ||
69 | Don't generate extra code to prevent speculative loads from occurring. | |
70 | ||
71 | .. option:: -mspecld-anomaly | |
72 | ||
73 | Default setting; overrides :option:`-mno-specld-anomaly`. | |
74 | ||
75 | .. option:: -mcsync-anomaly | |
76 | ||
77 | When enabled, the compiler ensures that the generated code does not | |
78 | contain CSYNC or SSYNC instructions too soon after conditional branches. | |
79 | If this option is used, ``__WORKAROUND_SPECULATIVE_SYNCS`` is defined. | |
80 | ||
81 | .. option:: -mno-csync-anomaly | |
82 | ||
83 | Don't generate extra code to prevent CSYNC or SSYNC instructions from | |
84 | occurring too soon after a conditional branch. | |
85 | ||
86 | .. option:: -mcsync-anomaly | |
87 | ||
88 | Default setting; overrides :option:`-mno-csync-anomaly`. | |
89 | ||
90 | .. option:: -mlow64k | |
91 | ||
92 | When enabled, the compiler is free to take advantage of the knowledge that | |
93 | the entire program fits into the low 64k of memory. | |
94 | ||
95 | .. option:: -mno-low64k | |
96 | ||
97 | Assume that the program is arbitrarily large. This is the default. | |
98 | ||
99 | .. option:: -mstack-check-l1 | |
100 | ||
101 | Do stack checking using information placed into L1 scratchpad memory by the | |
102 | uClinux kernel. | |
103 | ||
104 | .. option:: -mid-shared-library | |
105 | ||
106 | Generate code that supports shared libraries via the library ID method. | |
107 | This allows for execute in place and shared libraries in an environment | |
108 | without virtual memory management. This option implies :option:`-fPIC`. | |
109 | With a :samp:`bfin-elf` target, this option implies :option:`-msim`. | |
110 | ||
111 | .. option:: -mno-id-shared-library | |
112 | ||
113 | Generate code that doesn't assume ID-based shared libraries are being used. | |
114 | This is the default. | |
115 | ||
116 | .. option:: -mid-shared-library | |
117 | ||
118 | Default setting; overrides :option:`-mno-id-shared-library`. | |
119 | ||
120 | .. option:: -mleaf-id-shared-library | |
121 | ||
122 | Generate code that supports shared libraries via the library ID method, | |
123 | but assumes that this library or executable won't link against any other | |
124 | ID shared libraries. That allows the compiler to use faster code for jumps | |
125 | and calls. | |
126 | ||
127 | .. option:: -mno-leaf-id-shared-library | |
128 | ||
129 | Do not assume that the code being compiled won't link against any ID shared | |
130 | libraries. Slower code is generated for jump and call insns. | |
131 | ||
132 | .. option:: -mleaf-id-shared-library | |
133 | ||
134 | Default setting; overrides :option:`-mno-leaf-id-shared-library`. | |
135 | ||
136 | .. option:: -mshared-library-id=n | |
137 | ||
138 | Specifies the identification number of the ID-based shared library being | |
139 | compiled. Specifying a value of 0 generates more compact code; specifying | |
140 | other values forces the allocation of that number to the current | |
141 | library but is no more space- or time-efficient than omitting this option. | |
142 | ||
143 | .. option:: -msep-data | |
144 | ||
145 | Generate code that allows the data segment to be located in a different | |
146 | area of memory from the text segment. This allows for execute in place in | |
147 | an environment without virtual memory management by eliminating relocations | |
148 | against the text section. | |
149 | ||
150 | .. option:: -mno-sep-data | |
151 | ||
152 | Generate code that assumes that the data segment follows the text segment. | |
153 | This is the default. | |
154 | ||
155 | .. option:: -msep-data | |
156 | ||
157 | Default setting; overrides :option:`-mno-sep-data`. | |
158 | ||
159 | .. option:: -mlong-calls, -mno-long-calls | |
160 | ||
161 | Tells the compiler to perform function calls by first loading the | |
162 | address of the function into a register and then performing a subroutine | |
163 | call on this register. This switch is needed if the target function | |
164 | lies outside of the 24-bit addressing range of the offset-based | |
165 | version of subroutine call instruction. | |
166 | ||
167 | This feature is not enabled by default. Specifying | |
168 | :option:`-mno-long-calls` restores the default behavior. Note these | |
169 | switches have no effect on how the compiler generates code to handle | |
170 | function calls via function pointers. | |
171 | ||
172 | .. option:: -mfast-fp | |
173 | ||
174 | Link with the fast floating-point library. This library relaxes some of | |
175 | the IEEE floating-point standard's rules for checking inputs against | |
176 | Not-a-Number (NAN), in the interest of performance. | |
177 | ||
178 | .. option:: -minline-plt | |
179 | ||
180 | Enable inlining of PLT entries in function calls to functions that are | |
181 | not known to bind locally. It has no effect without :option:`-mfdpic`. | |
182 | ||
183 | .. option:: -mmulticore | |
184 | ||
185 | Build a standalone application for multicore Blackfin processors. | |
186 | This option causes proper start files and link scripts supporting | |
187 | multicore to be used, and defines the macro ``__BFIN_MULTICORE``. | |
188 | It can only be used with :option:`-mcpu=bf561[-sirevision]`. | |
189 | ||
190 | This option can be used with :option:`-mcorea` or :option:`-mcoreb`, which | |
191 | selects the one-application-per-core programming model. Without | |
192 | :option:`-mcorea` or :option:`-mcoreb`, the single-application/dual-core | |
193 | programming model is used. In this model, the main function of Core B | |
194 | should be named as ``coreb_main``. | |
195 | ||
196 | If this option is not used, the single-core application programming | |
197 | model is used. | |
198 | ||
199 | .. option:: -mcorea | |
200 | ||
201 | Build a standalone application for Core A of BF561 when using | |
202 | the one-application-per-core programming model. Proper start files | |
203 | and link scripts are used to support Core A, and the macro | |
204 | ``__BFIN_COREA`` is defined. | |
205 | This option can only be used in conjunction with :option:`-mmulticore`. | |
206 | ||
207 | .. option:: -mcoreb | |
208 | ||
209 | Build a standalone application for Core B of BF561 when using | |
210 | the one-application-per-core programming model. Proper start files | |
211 | and link scripts are used to support Core B, and the macro | |
212 | ``__BFIN_COREB`` is defined. When this option is used, ``coreb_main`` | |
213 | should be used instead of ``main``. | |
214 | This option can only be used in conjunction with :option:`-mmulticore`. | |
215 | ||
216 | .. option:: -msdram | |
217 | ||
218 | Build a standalone application for SDRAM. Proper start files and | |
219 | link scripts are used to put the application into SDRAM, and the macro | |
220 | ``__BFIN_SDRAM`` is defined. | |
221 | The loader should initialize SDRAM before loading the application. | |
222 | ||
223 | .. option:: -micplb | |
224 | ||
225 | Assume that ICPLBs are enabled at run time. This has an effect on certain | |
226 | anomaly workarounds. For Linux targets, the default is to assume ICPLBs | |
3ed1b4ce | 227 | are enabled; for standalone applications the default is off. |