Next: Darwin Options, Previous: CRIS Options, Up: Submodel Options [Contents][Index]

#### 3.19.10 C-SKY Options

GCC supports these options when compiling for C-SKY V2 processors.

`-march=arch`

  Specify the C-SKY target architecture. Valid values for arch are: ‘`ck801`’, ‘`ck802`’, ‘`ck803`’, ‘`ck807`’, and ‘`ck810`’. The default is ‘`ck810`’.

`-mcpu=cpu`

  Specify the C-SKY target processor. Valid values for cpu are: ‘`ck801`’, ‘`ck801t`’, ‘`ck802`’, ‘`ck802t`’, ‘`ck802j`’, ‘`ck803`’, ‘`ck803h`’, ‘`ck803t`’, ‘`ck803ht`’, ‘`ck803f`’, ‘`ck803fh`’, ‘`ck803e`’, ‘`ck803eh`’, ‘`ck803et`’, ‘`ck803eht`’, ‘`ck803ef`’, ‘`ck803efh`’, ‘`ck803ft`’, ‘`ck803eft`’, ‘`ck803efht`’, ‘`ck803r1`’, ‘`ck803hr1`’, ‘`ck803tr1`’, ‘`ck803htr1`’, ‘`ck803fr1`’, ‘`ck803fhr1`’, ‘`ck803er1`’, ‘`ck803ehr1`’, ‘`ck803etr1`’, ‘`ck803ehtr1`’, ‘`ck803efr1`’, ‘`ck803efhr1`’, ‘`ck803ftr1`’, ‘`ck803eftr1`’, ‘`ck803efhtr1`’, ‘`ck803s`’, ‘`ck803st`’, ‘`ck803se`’, ‘`ck803sf`’, ‘`ck803sef`’, ‘`ck803seft`’, ‘`ck807e`’, ‘`ck807ef`’, ‘`ck807`’, ‘`ck807f`’, ‘`ck810e`’, ‘`ck810et`’, ‘`ck810ef`’, ‘`ck810eft`’, ‘`ck810`’, ‘`ck810v`’, ‘`ck810f`’, ‘`ck810t`’, ‘`ck810fv`’, ‘`ck810tv`’, ‘`ck810ft`’, and ‘`ck810ftv`’.

`-mbig-endian`
`-EB`
`-mlittle-endian`
`-EL`

  Select big- or little-endian code. The default is little-endian.

`-mfloat-abi=name`

  Specifies which floating-point ABI to use. Permissible values are: ‘`soft`’, ‘`softfp`’ and ‘`hard`’.

  Specifying ‘`soft`’ causes GCC to generate output containing library calls for floating-point operations. ‘`softfp`’ allows the generation of code using hardware floating-point instructions, but still uses the soft-float calling conventions. ‘`hard`’ allows generation of floating-point instructions and uses FPU-specific calling conventions.

  The default depends on the specific target configuration. Note that the hard-float and soft-float ABIs are not link-compatible; you must compile your entire program with the same ABI, and link with a compatible set of libraries.

`-mhard-float`
`-msoft-float`

  Select hardware or software floating-point implementations. The default is soft float.

`-mdouble-float`
`-mno-double-float`

  When `-mhard-float` is in effect, enable generation of double-precision float instructions. This is the default except when compiling for CK803.

`-mfdivdu`
`-mno-fdivdu`

  When `-mhard-float` is in effect, enable generation of `frecipd`, `fsqrtd`, and `fdivd` instructions. This is the default except when compiling for CK803.

`-mfpu=fpu`

  Select the floating-point processor. This option can only be used with `-mhard-float`. Values for fpu are ‘`fpv2_sf`’ (equivalent to ‘`-mno-double-float -mno-fdivdu`’), ‘`fpv2`’ (‘`-mdouble-float -mno-divdu`’), and ‘`fpv2_divd`’ (‘`-mdouble-float -mdivdu`’).

`-melrw`
`-mno-elrw`

  Enable the extended `lrw` instruction. This option defaults to on for CK801 and off otherwise.

`-mistack`
`-mno-istack`

  Enable interrupt stack instructions; the default is off.

  The `-mistack` option is required to handle the `interrupt` and `isr` function attributes (see C-SKY Function Attributes).

`-mmp`

  Enable multiprocessor instructions; the default is off.

`-mcp`

  Enable coprocessor instructions; the default is off.

`-mcache`

  Enable coprocessor instructions; the default is off.

`-msecurity`

  Enable C-SKY security instructions; the default is off.

`-mtrust`

  Enable C-SKY trust instructions; the default is off.

`-mdsp`
`-medsp`
`-mvdsp`

  Enable C-SKY DSP, Enhanced DSP, or Vector DSP instructions, respectively. All of these options default to off.

`-mdiv`
`-mno-div`

  Generate divide instructions. Default is off.

`-msmart`
`-mno-smart`

  Generate code for Smart Mode, using only registers numbered 0-7 to allow use of 16-bit instructions. This option is ignored for CK801 where this is the required behavior, and it defaults to on for CK802. For other targets, the default is off.

`-mhigh-registers`
`-mno-high-registers`

  Generate code using the high registers numbered 16-31. This option is not supported on CK801, CK802, or CK803, and is enabled by default for other processors.

`-manchor`
`-mno-anchor`

  Generate code using global anchor symbol addresses.

`-mpushpop`
`-mno-pushpop`

  Generate code using `push` and `pop` instructions. This option defaults to on.

`-mmultiple-stld`
`-mstm`
`-mno-multiple-stld`
`-mno-stm`

  Generate code using `stm` and `ldm` instructions. This option isn’t supported on CK801 but is enabled by default on other processors.

`-mconstpool`
`-mno-constpool`

  Create constant pools in the compiler instead of deferring it to the assembler. This option is the default and required for correct code generation on CK801 and CK802, and is optional on other processors.

`-mstack-size`
`-mno-stack-size`

  Emit `.stack_size` directives for each function in the assembly output. This option defaults to off.

`-mccrt`
`-mno-ccrt`

  Generate code for the C-SKY compiler runtime instead of libgcc. This option defaults to off.

`-mbranch-cost=n`

  Set the branch costs to roughly `n` instructions. The default is 1.

`-msched-prolog`
`-mno-sched-prolog`

  Permit scheduling of function prologue and epilogue sequences. Using this option can result in code that is not compliant with the C-SKY V2 ABI prologue requirements and that cannot be debugged or backtraced. It is disabled by default.

`-msim`

  Links the library libsemi.a which is in compatible with simulator. Applicable to ELF compiler only.

Next: Darwin Options, Previous: CRIS Options, Up: Submodel Options [Contents][Index]