-march=
arch- Generate code for a specific M680x0 or Coldfire architecture. This
determines the instruction set that can be targetted. It can be used
in conjunction, with or instead of the -mcpu option.
Permissible values to select M680x0 architectures are: `68000',
`68010', `68020', `68030', `68040', `68060',
`cpu32'. Coldfire architectures are selected by ISA name, and
permissible values are: `isaa', `isaaplus', `isab' or
`isac'. Various other options (such as -mdiv) can be
used to enable or disable specific instruction set features. By
default these architectures will include hardware divide. If you want
to generate code that will run on a family of similar processors you
should use the march= option, together with the
-mtune= option, if you want to optimize for one particular
cpu or micro architecture.
-mcpu=
cpu- Generate code for a specific M680x0 or Coldfire processor. You
usually want to provide either an -mcpu= or -march=
option, but not both. If you give both, the -mcpu= will be
used. M680x0 cpus are: `68000', `68010', `68020',
`68030', `68040', `68060', `68302', `68332'
and `cpu32'. Coldfire cpus are:
`5202', `5204' `5206', `5206e',
`5207', `5208',
`5210a', `5211a',
`5211', `5212', `5213',
`5214', `5216',
`52230', `52231', `52232', `52233', `52234',
`52235',
`5224', `5225',
`5232', `5233', `5234', `5235', `523x',
`5249', `5250',
`5270', `5271', `5272', `5274', `5275',
`5280', `5281', `5282', `528x',
`5307',
`5327', `5328', `5329', `532x',
`5372', `5373', `537x',
`5407',
`5470', `5471', `5472', `5473', `5474',
`5475', `547x' and
`5480', `5481', `5482', `5483', `5484', `5485',
`548x'. When a Coldfire cpu is targetted, two
preprocessor macros are defined. One is of the form
`__mcf_cpu_NNNN' and indicates which cpu has been
selected. The other is of the form `__mcf_family_NNNN' and
indicates to which family of cpus the selected cpu belongs.
-mtune=
tune- This option selects a particular micro architecture to tune for.
M680x0 micro architectures are: `68000', `68010',
`68020', `68030', `68040', `68060' and
`cpu32'. Coldfire micro architectures are `cfv2',
`cfv3', `cfv4' and `cfv4e'.
-m68000
-mc68000
- Generate output for a 68000. This is the default
when the compiler is configured for 68000-based systems. It is
equivalent to mcpu=68000.
Use this option for microcontrollers with a 68000 or EC000 core,
including the 68008, 68302, 68306, 68307, 68322, 68328 and 68356.
-m68020
-mc68020
- Generate output for a 68020. This is the default
when the compiler is configured for 68020-based systems. It is
equivalent to mcpu=68020.
-m68020-40
- Generate output which can run on the 68020, but tuned for a 68040.
Instructions added to the 68040 will not be generated. Nor will 68881
instructions that are emulated on the 68040. This results in code
which can run relatively efficiently on either a 68020/68881 or a
68030 or a 68040. This is equivalent to -mcpu=68020
-mtune=68040.
-m68020-60
- Generate output which can run on the 68020, but tuned for a 68060.
Instructions added to the 68060 will not be generated. Nor will 68881
instructions that are emulated on the 68060. This results in code
which can run relatively efficiently on either a 68020/68881 or a
68030 or a 68040. This is equivalent to -mcpu=68020
-mtune=68060.
-m68030
- Generate output for a 68030. This is the default when the compiler is
configured for 68030-based systems. It is equivalent to
-mcpu=68030.
-m68040
- Generate output for a 68040. This is the default when the compiler is
configured for 68040-based systems. It is equivalent to
-mcpu=68040.
This option inhibits the use of 68881/68882 instructions that have to be
emulated by software on the 68040. Use this option if your 68040 does not
have code to emulate those instructions.
-m68060
- Generate output for a 68060. This is the default when the compiler is
configured for 68060-based systems. It is equivalent to
-mcpu=68060.
This option inhibits the use of 68020 and 68881/68882 instructions that
have to be emulated by software on the 68060. Use this option if your 68060
does not have code to emulate those instructions.
-m68302
- Generate code for a 68302. This is equivalent to -mcpu=68302.
-m68332
- Generate code for a 68332. This is equivalent to -mcpu=68332.
-m68851
- This option is ignored, for backwards compatibility, as it has no
meaning for compiler code generation.
-mcpu32
- Generate output for a CPU32. This is the default
when the compiler is configured for CPU32-based systems. It is
equivalent to -mcpu=cpu32.
Use this option for microcontrollers with a
CPU32 or CPU32+ core, including the 68330, 68331, 68332, 68333, 68334,
68336, 68340, 68341, 68349 and 68360.
-m5200
- Generate output for a 52XX ColdFire family cpu. This is the default
when the compiler is configured for 520X-based systems. It is
equivalent to -march=isaa -mno-div -mtune=cfv2.
Use this option for microcontroller with a 5200 core, including
the MCF5202, MCF5203, MCF5204 and MCF5202.
-m5206e
- Generate code for the 5206e ColdFire cpu. It is equivalent to
-mcpu=5206e.
-m528x
- Generate code for the 528x ColdFire cpu. It is equivalent to
-mcpu=528x.
-m5307
- Generate code for the 5307 ColdFire cpu. It is equivalent to
-mcpu=5307.
-m5407
- Generate code for the 5407 ColdFire cpu. It is equivalent to
-mcpu=5407.
-mcfv4e
- Generate output for a ColdFire V4e family cpu (e.g. 547x/548x).
This includes use of hardware floating point instructions. It is
equivalent to -march=isab -mhard-float
-mtune=cfv4e.
-m68881
- Generate output containing 68881 instructions for floating point.
This is the default for most 68020 systems unless
--with-float=soft was specified when the compiler was
configured. It is equivalent to -mhard-float on M680x0
targets.
-mhard-float
- Generate code using floating point instructions. This is the default
when targeting processors that have floating point instructions.
-msoft-float
- Generate output containing library calls for floating point.
-mbitfield
-mno-bitfield
-mnobitfield
- Selects whether M680x0 bitfield instructions should be
generated. Bitfield instructions are normally only generated when
targeting the 68020 or higher architecture. -mnobitfield is an
alternate spelling kept for backwards compatibility.
-mdiv
-mno-div
- Selects whether ColdFire hardware divide (& remainder) instructions
are generated. This is the default for all ColdFire architecture
variants, but not for those ColdFire cpus that do not have hardware
divide support (5206 for example).
-mshort
-mno-short
-mnoshort
- Selects whether type
int
should be 16 bits wide (like
short int
), or 32 bits wide (like long int
). The
default is for int
to be a 32 bit type.
-mnoshort is alternate spelling kept for backwards compatibility.
Consider type int
to be 16 bits wide, like short int
.
Additionally, parameters passed on the stack are also aligned to a
16-bit boundary even on targets whose API mandates promotion to 32-bit.
-malign-int
-mno-align-int
- Control whether GCC aligns
int
, long
, long long
,
float
, double
, and long double
variables on a 32-bit
boundary (-malign-int) or a 16-bit boundary (-mno-align-int).
Aligning variables on 32-bit boundaries produces code that runs somewhat
faster on processors with 32-bit busses at the expense of more
memory. The default is -mno-align-int.
Warning: if you use the -malign-int switch, GCC will
align structures containing the above types differently than
most published application binary interface specifications for the m68k.
-mstrict-align
-mno-strict-align
- Control whether unaligned memory references will be handled by
the system, or whether they must be handled by the compiler
itself. The default is -mno-strict-align
-mrtd
-mno-rtd
-mnortd
- Use a different function-calling convention, in which functions
that take a fixed number of arguments return with the
rtd
instruction, which pops their arguments while returning. This
saves one instruction in the caller since there is no need to pop
the arguments there.
This calling convention is incompatible with the one normally
used on Unix, so you cannot use it if you need to call libraries
compiled with the Unix compiler.
Also, you must provide function prototypes for all functions that
take variable numbers of arguments (including printf
);
otherwise incorrect code will be generated for calls to those
functions.
In addition, seriously incorrect code will result if you call a
function with too many arguments. (Normally, extra arguments are
harmlessly ignored.)
The rtd
instruction is supported by the 68010, 68020, 68030,
68040, 68060 and CPU32 processors, but not by the 68000 or ColdFire.
-mpcrel
-mno-pcrel
- Use the pc-relative addressing mode of the 68000 directly, instead of
using a global offset table. At present, this option implies -fpic,
allowing at most a 16-bit offset for pc-relative addressing. -fPIC is
not presently supported with -mpcrel, though this could be
supported for 68020 and higher processors.
-msep-data
-mno-sep-data
- Generate code that allows the data segment to be located in a
different area of memory from the text segment. This allows for
execute in place in an environment without virtual memory management.
This option implies -fPIC. The default is
-mno-sep-data, which assumes that the data segment follows
the text segment. This is the default.
-mid-shared-library
-mno-id-shared-library
- Generate code that supports shared libraries via the library ID method.
This allows for execute in place and shared libraries in an environment
without virtual memory management. This option implies
-fPIC. The default is -mno-id-shared-library, which
does not assume that ID based shared libraries are being used.
-mshared-library-id=n
- Specify the identification number of the ID based shared library being
compiled. Specifying a value of 0 will generate more compact code, specifying
other values will force the allocation of that number to the current
library but is no more space or time efficient than omitting this option.