-target
Specify size of data types and endianness by selecting a predefined target processor or creating a custom processor
Syntax
-target processorName
Description
specifies the processor on which you deploy your code. You can specify a named processor with this option, or create a custom processor with -target processorName-target mcpu, followed by options specifying processor details.
The following table lists the processor names supported with this option, along the processor details. If you select one of the specialized cross-compilers for the option -compiler, you can only specify a subset of the processors below. For more information on the supported processors and the corresponding processor details, see Compilation toolchain for static analysis (-compiler).
| Target | char | short | int | long | long long | float | double | long doublea | pointer | Default sign of char | endian | Alignment |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
i386 | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 96 | 32 | signed | Little | 32 |
sparc | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 128 | 32 | signed | Big | 64 |
m68kb | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 96 | 32 | signed | Big | 64 |
powerpc | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 128 | 32 | unsigned | Big | 64 |
necv850 | 8 | 16 | 32 | 32 | 32 | 32 | 32 | 64 | 32 | signed | Little | 32 |
hc08c | 8 | 16 | 16 | 32 | 32 | 32 | 32 | 32 | 16d | unsigned | Big | 32 |
x86_64 | 8 | 16 | 32 | 64e | 64 | 32 | 64 | 128 | 64 | signed | Little | 128 |
arm | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 64 | 32 | signed | Big | 64 |
arm64 | 8 | 16 | 32 | 64 | 64 | 32 | 64 | 128 | 64 | signed | Big | 128 |
riscv | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 128 | 32 | signed | Big | 128 |
riscv64 | 8 | 16 | 32 | 64 | 64 | 32 | 64 | 128 | 64 | signed | Big | 128 |
mcpu | 8 | 8 | 16 | 32 | 32 | 32 | 32 | 32 | 16 | signed | Little | 32 |
a For targets where the size of
b The M68k family (68000, 68020, and so on) includes the “ColdFire” processor c Non-ANSI C specified keywords and compiler implementation-dependent pragmas and interrupt facilities are not taken into account by this support d All kinds of pointers (near or far pointer) have 2 bytes (hc08) or 4 bytes (hc12) of width physically. e Use option | ||||||||||||
You can modify some properties of the named processors, or create a custom processor with -target mcpu and specify the processor details with another set of options:
| Option | Description | Available With | Example |
|---|---|---|---|
-little-endian | Little-endian architectures are Less Significant byte First (LSF). For example: i386. Specifies that the less significant byte of a short integer (e.g. 0x00FF) is stored at the first byte (0xFF) and the most significant byte (0x00) at the second byte. | All targets | polyspace-code-prover -lang c -target mcpu -little-endian |
-big-endian | Big-endian architectures are Most Significant byte First (MSF). For example: SPARC, m68k. Specifies that the most significant byte of a short integer (e.g. 0x00FF) is stored at the first byte (0x00) and the less significant byte (0xFF) at the second byte. | All targets | polyspace-code-prover -target mcpu -big-endian |
-default-sign-of-char [signed | unsigned] | Specify default sign of
| All targets | polyspace-code-prover -default-sign-of-char unsigned -target mcpu |
-char-is-16bits |
Incompatible with | mcpu | polyspace-code-prover -target mcpu -char-is-16bits |
-short-is-8bits | Define short as 8 bits, regardless of sign | mcpu | polyspace-code-prover -target mcpu -short-is-8bits |
-int-is-32bits | Define int as 32 bits, regardless of sign. Alignment is also set to 32 bits. | mcpu, hc08, hc12, mpc5xx | polyspace-code-prover -target mcpu -int-is-32bits |
-long-is-32bits | Define If your project sets | All targets | polyspace-code-prover -target mcpu -long-is-32bits |
-long-long-is-64bits | Define long long as 64 bits, regardless of sign. Alignment is also set to 64 bits. | mcpu | polyspace-code-prover -target mcpu -long-long-is-64bits |
-double-is-64bits | Define double and long double as 64 bits, regardless of sign. | mcpu, sharc21x61, hc08, hc12, mpc5xx | polyspace-code-prover -target mcpu -double-is-64bits |
-pointer-is-24bits | Define pointer as 24 bits, regardless of sign. | c18 | polyspace-code-prover -target c18-pointer-is-24bits |
-pointer-is-32bits | Define pointer as 32 bits, regardless of sign. | mcpu | polyspace-code-prover -target mcpu -pointer-is-32bits |
-align [128|64|32|16|8] | Specifies the largest alignment of scalar objects, structures, classes, unions, or arrays to the 128, 64, 32, 16, or 8 bit boundaries. For instance, if the alignment of basic types in an array or struct is always 8, the array or struct storage is strictly determined by the size of the individual data objects without member and end padding. | All targets | polyspace-code-prover -target mcpu -align 16 |