-m options are defined for the i386 and x86-64 family of
While picking a specific cpu-type will schedule things appropriately
for that particular chip, the compiler will not generate any code that
does not run on the i386 without the
i586 is equivalent to
is equivalent to
athlon are the
AMD chips as opposed to the Intel ones.
-mcpu. Moreover, specifying
-mcpu=pentiumprorespectively. These synonyms are deprecated.
-ffloat-storefor more detailed description.
This is the default choice for i386 compiler.
For i387 you need to use
-msse2 switches to enable SSE extensions and make this option
effective. For x86-64 compiler, these extensions are enabled by default.
The resulting code should be considerably faster in majority of cases and avoid the numerical instability problems of 387 code, but may break some existing code that expects temporaries to be 80bit.
This is the default choice for x86-64 compiler.
att(the default one).
On machines where a function returns floating point results in the 80387
register stack, some floating point opcodes may be emitted even if
-msoft-float is used.
The usual calling convention has functions return values of types
double in an FPU register, even if there
is no FPU. The idea is that the operating system should emulate
-mno-fp-ret-in-387 causes such values to be returned
in ordinary CPU registers instead.
sqrtinstructions for the 387. Specify this option to avoid generating those instructions. This option is the default on FreeBSD, OpenBSD and NetBSD. This option is overridden when
-marchindicates that the target cpu will always have an FPU and so the instruction will not need emulation. As of revision 2.6.1, these instructions are not generated unless you also use the
long double, and
long longvariables on a two word boundary or a one word boundary. Aligning
doublevariables on a two word boundary will produce code that runs somewhat faster on a
Pentiumat the expense of more memory.
Warning: if you use the
structures containing the above types will be aligned differently than
the published application binary interface specifications for the 386
and will not be binary compatible with structures in code compiled
without that switch.
long doubletype. i386 application binary interface specify the size to be 12 bytes, while modern architectures (Pentium and newer) prefer
long doublealigned to 8 or 16 byte boundary. This is impossible to reach with 12 byte long doubles in the array accesses.
Warning: if you use the
-m128bit-long-double switch, the
structures and arrays containing
long double will change their size as
well as function calling convention for function taking
will be modified.
long doubleto 96 bits as required by the i386 application binary interface. This is the default.
-msvr3-shlibplaces them into
bss. These options are meaningful only on System V Release 3.
retnum instruction, which pops their arguments while returning. This saves one instruction in the caller since there is no need to pop the arguments there.
You can specify that an individual function is called with this calling
sequence with the function attribute
stdcall. You can also
-mrtd option by using the function attribute
cdecl. See Function Attributes.
Warning: 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
otherwise incorrect code will be generated for calls to those
In addition, seriously incorrect code will result if you call a
function with too many arguments. (Normally, extra arguments are
regparm. See Function Attributes.
Warning: if you use this switch, and
num is nonzero, then you must build all modules with the same
value, including any libraries. This includes the system libraries and
-mpreferred-stack-boundaryis not specified, the default is 4 (16 bytes or 128 bits), except when optimizing for code size (
-Os), in which case the default is the minimum correct alignment (4 bytes for x86, and 8 bytes for x86-64).
On Pentium and PentiumPro,
long double values
should be aligned to an 8 byte boundary (see
suffer significant run time performance penalties. On Pentium III, the
Streaming SIMD Extension (SSE) data type
__m128 suffers similar
penalties if it is not 16 byte aligned.
To ensure proper alignment of this values on the stack, the stack boundary must be as aligned as that required by any value stored on the stack. Further, every function must be generated such that it keeps the stack aligned. Thus calling a function compiled with a higher preferred stack boundary from a function compiled with a lower preferred stack boundary will most likely misalign the stack. It is recommended that libraries that use callbacks always use the default setting.
This extra alignment does consume extra stack space, and generally
increases code size. Code that is sensitive to stack space usage, such
as embedded systems and operating system kernels, may want to reduce the
preferred alignment to
See X86 Built-in Functions, for details of the functions enabled and disabled by these switches.
To have SSE/SSE2 instructions generated automatically from floating-point code,
Mingw32. Code that relies on thread-safe exception handling must compile and link all code with the
-mthreadsoption. When compiling,
-D_MT; when linking, it links in a special thread helper library
-lmingwthrdwhich cleans up per thread exception handling data.
-fomit-frame-pointerremoves the frame pointer for all functions which might make debugging harder.
-m switches are supported in addition to the above
on AMD x86-64 processors in 64-bit environments.
-mno-red-zonedisables this red zone.