3.17.17 M680x0 Options
These are the ` -m ' options defined for the 68000 series. The default values for these options depends on which style of 68000 was selected when the compiler was configured; the defaults for the most common choices are given below.
-
-m68000
-
-mc68000
-
Generate output for a 68000. This is the default when the compiler is configured for 68000-based systems.
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.
-
-m68881
-
Generate output containing 68881 instructions for floating point. This is the default for most 68020 systems unless
--nfp
was specified when the compiler was configured.
-
-m68030
-
Generate output for a 68030. This is the default when the compiler is configured for 68030-based systems.
-
-m68040
-
Generate output for a 68040. This is the default when the compiler is configured for 68040-based systems.
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.
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.
-
-mcpu32
-
Generate output for a CPU32. This is the default when the compiler is configured for CPU32-based systems.
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 520X “coldfire” family cpu. This is the default when the compiler is configured for 520X-based systems.
Use this option for microcontroller with a 5200 core, including the MCF5202, MCF5203, MCF5204 and MCF5202.
-
-m68020-40
-
Generate output for a 68040, without using any of the new instructions. This results in code which can run relatively efficiently on either a 68020/68881 or a 68030 or a 68040. The generated code does use the 68881 instructions that are emulated on the 68040.
-
-m68020-60
-
Generate output for a 68060, without using any of the new instructions. This results in code which can run relatively efficiently on either a 68020/68881 or a 68030 or a 68040. The generated code does use the 68881 instructions that are emulated on the 68060.
-
-msoft-float
-
Generate output containing library calls for floating point. Warning: the requisite libraries are not available for all m68k targets. Normally the facilities of the machine's usual C compiler are used, but this can't be done directly in cross-compilation. You must make your own arrangements to provide suitable library functions for cross-compilation. The embedded targets `
m68k-*-aout
' and `
m68k-*-coff
' do provide software floating point support.
-
-mshort
-
Consider type
int
to be 16 bits wide, likeshort 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.
-
-mnobitfield
-
Do not use the bit-field instructions. The
-m68000
,
-mcpu32
and
-m5200
options imply
-mnobitfield
.
-
-mbitfield
-
Do use the bit-field instructions. The
-m68020
option implies
-mbitfield
. This is the default if you use a configuration designed for a 68020.
-
-mrtd
-
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 5200.
-
-malign-int
-
-mno-align-int
-
Control whether GCC aligns
int
,long
,long long
,float
,double
, andlong 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.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.
-
-mpcrel
-
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.
-
-mno-strict-align
-
-mstrict-align
-
Do not (do) assume that unaligned memory references will be handled by the system.
-
-msep-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
.
-
-mno-sep-data
- Generate code that assumes that the data segment follows the text segment. This is the default.
-
-mid-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
.
-
-mno-id-shared-library
- Generate code that doesn't assume ID based shared libraries are being used. This is the default.
-
-mshared-library-id=n
- Specified 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.