-
Notifications
You must be signed in to change notification settings - Fork 0
Understanding GCC's Target Specific Options
In addition to the common options, GCC also supports a set of -m<value>
target specific options. Each of them
configures a particular feature or an extension. For example, -mno-code-density
option disables generating code
density instructions.
-mcpu=<core>
selects a particular ISA and CPU family and enables/disables a set of other -m
options.
Each -mcpu
value leads to linking with a prebuilt library which corresponds to this particular
-mcpu=<value>
and is built using this -mcpu=<value>
.
For example, option combination -mcpu=em4 -mno-code-density
will generate code that doesn't
use code density instructions, however it will be linked with standard library that has been built
with just -mcpu=em4
, which uses code density instructions - therefore a final application still may
use code density instructions.
-mcpu= |
-msimd |
-m128 |
-mll64 |
---|---|---|---|
hs5x |
Y | N/A | |
hs58 |
Y | N/A | Y |
hs6x |
Y | N/A | |
hs68 |
Y | Y | N/A |
-mcpu= |
-mdiv-rem |
-matomic |
-mll64 |
-mmpy-option= |
-mfpu= |
---|---|---|---|---|---|
hs |
Y | ||||
hs34 |
Y | mpy |
|||
archs |
Y | Y | Y | mpy |
|
hs38 |
Y | Y | Y | plus_qmacw |
|
hs4x |
Y | Y | Y | plus_qmacw |
|
hs4xd |
Y | Y | Y | plus_qmacw |
|
hs38_linux |
Y | Y | Y | plus_qmacw |
fpud_all |
-mcpu |
-mcode-density |
-mnorm |
-mswap |
-mbarrel-shifter |
-mdiv-rem |
-mmpy-option= |
-mfpu= |
-mrf16 |
---|---|---|---|---|---|---|---|---|
em |
||||||||
em_mini |
Y | |||||||
em4 |
Y | Y | ||||||
arcem |
Y | Y | wlh1 |
Y | ||||
em4_dmips |
Y | Y | Y | Y | Y | wlh1 |
Y | |
em4_fpus |
Y | Y | Y | Y | Y | wlh1 |
fpus |
Y |
em4_fpuda |
Y | Y | Y | Y | Y | wlh1 |
fpuda |
Y |
-mcpu= |
-mnorm |
-mswap |
-mbarrel-shifter |
Multiplier |
---|---|---|---|---|
arc700 |
Y | Y | Y | -mmpy |
arc600 |
Y | |||
arc600_norm |
Y | Y | ||
arc600_mul64 |
Y | Y | -mmul64 |
|
arc600_mul32x16 |
Y | Y | -mmul32x16 |
|
arc601 |
||||
arc601_norm |
Y | |||
arc601_mul64 |
Y | -mmul64 |
||
arc601_mul32x16 |
Y | -mmul32x16 |