-EB
-EL
mips*el-*-*
configurations.
-march=arch
mips1, mips2, mips3, mips4,
mips32, mips32r2, and mips64.
The processor names are:
4kc, 4kp, 5kc, 20kc,
m4k,
r2000, r3000, r3900, r4000, r4400,
r4600, r4650, r6000, r8000, rm7000,
rm9000,
orion,
sb1,
vr4100, vr4111, vr4120, vr4300,
vr5000, vr5400 and vr5500.
The special value from-abi selects the
most compatible architecture for the selected ABI (that is,
mips1 for 32-bit ABIs and mips3 for 64-bit ABIs).
In processor names, a final 000 can be abbreviated as k
(for example, -march=r2k). Prefixes are optional, and
vr may be written r.
GCC defines two macros based on the value of this option. The first
is _MIPS_ARCH, which gives the name of target architecture, as
a string. The second has the form _MIPS_ARCH_foo,
where foo is the capitalized value of _MIPS_ARCH.
For example, -march=r2000 will set _MIPS_ARCH
to "r2000" and define the macro _MIPS_ARCH_R2000.
Note that the _MIPS_ARCH macro uses the processor names given
above. In other words, it will have the full prefix and will not
abbreviate 000 as k. In the case of from-abi,
the macro names the resolved architecture (either "mips1" or
"mips3"). It names the default architecture when no
-march option is given.
-mtune=arch
-march.
When this option is not used, GCC will optimize for the processor
specified by -march. By using -march and
-mtune together, it is possible to generate code that will
run on a family of processors, but optimize the code for one
particular member of that family.
-mtune defines the macros _MIPS_TUNE and
_MIPS_TUNE_foo, which work in the same way as the
-march ones described above.
-mips1
-march=mips1.
-mips2
-march=mips2.
-mips3
-march=mips3.
-mips4
-march=mips4.
-mips32
-march=mips32.
-mips32r2
-march=mips32r2.
-mips64
-march=mips64.
-mips16
-mno-mips16
-mabi=32
-mabi=o64
-mabi=n32
-mabi=64
-mabi=eabi
Note that the EABI has a 32-bit and a 64-bit variant. GCC normally
generates 64-bit code when you select a 64-bit architecture, but you
can use -mgp32 to get 32-bit code instead.
-mabicalls
-mno-abicalls
-mabicalls is the default for SVR4-based systems.
-mxgot
-mno-xgot
GCC normally uses a single instruction to load values from the GOT. While this is relatively efficient, it will only work if the GOT is smaller than about 64k. Anything larger will cause the linker to report an error such as:
relocation truncated to fit: R_MIPS_GOT16 foobar
If this happens, you should recompile your code with -mxgot.
It should then work with very large GOTs, although it will also be
less efficient, since it will take three instructions to fetch the
value of a global symbol.
Note that some linkers can create multiple GOTs. If you have such a
linker, you should only need to use -mxgot when a single object
file accesses more than 64k's worth of GOT entries. Very few do.
These options have no effect unless GCC is generating position
independent code.
-membedded-pic
-mno-embedded-pic
-mgp32
-mgp64
-mfp32
-mfp64
-mhard-float
-msoft-float
-msingle-float
-mdouble-float
-mint64
int and long types to be 64 bits wide. See
-mlong32 for an explanation of the default and the way
that the pointer size is determined.
-mlong64
long types to be 64 bits wide. See -mlong32 for
an explanation of the default and the way that the pointer size is
determined.
-mlong32
long, int, and pointer types to be 32 bits wide.
The default size of ints, longs and pointers depends on
the ABI. All the supported ABIs use 32-bit ints. The n64 ABI
uses 64-bit longs, as does the 64-bit EABI; the others use
32-bit longs. Pointers are the same size as longs,
or the same size as integer registers, whichever is smaller.
-G num
All modules should be compiled with the same -G num
value.
-membedded-data
-mno-embedded-data
-muninit-const-in-rodata
-mno-uninit-const-in-rodata
const variables in the read-only data section.
This option is only meaningful in conjunction with -membedded-data.
-msplit-addresses
-mno-split-addresses
%hi() and %lo() assembler
relocation operators. This option has been superceded by
-mexplicit-relocs but is retained for backwards compatibility.
-mexplicit-relocs
-mno-explicit-relocs
-mno-explicit-relocs,
is to use assembler macros instead.
-mexplicit-relocs is usually the default if GCC was
configured to use an assembler that supports relocation operators.
However, there are two exceptions:
-mabi=64 and -mno-abicalls. This will be addressed
in a future release.
-mabicalls and -fno-unit-at-a-time
implies -mno-explicit-relocs unless explicitly overridden.
This is because, when generating abicalls, the choice of relocation
depends on whether a symbol is local or global. In some rare cases,
GCC will not be able to decide this until the whole compilation unit
has been read.
-mrnames
-mno-rnames
-mno-rnames, which tells GCC
to use hardware names like $4 instead of software names like
a0. The only assembler known to support -rnames is
the Algorithmics assembler.
-mcheck-zero-division
-mno-check-zero-division
-mcheck-zero-division.
-mmemcpy
-mno-memcpy
memcpy() for non-trivial block
moves. The default is -mno-memcpy, which allows GCC to inline
most constant-sized copies.
-mlong-calls
-mno-long-calls
jal instruction. Calling
functions using jal is more efficient but requires the caller
and callee to be in the same 256 megabyte segment.
This option has no effect on abicalls code. The default is
-mno-long-calls.
-mmad
-mno-mad
mad, madu and mul
instructions, as provided by the R4650 ISA.
-mfused-madd
-mno-fused-madd
-mfused-madd.
When multiply-accumulate instructions are used, the intermediate
product is calculated to infinite precision and is not subject to
the FCSR Flush to Zero bit. This may be undesirable in some
circumstances.
-nocpp
.s suffix) when assembling them.
-mfix-sb1
-mno-fix-sb1
-mflush-func=func
-mno-flush-func
_flush_func(), that is, the address of the
memory range for which the cache is being flushed, the size of the
memory range, and the number 3 (to flush both caches). The default
depends on the target GCC was configured for, but commonly is either
_flush_func or __cpu_flush.
-mbranch-likely
-mno-branch-likely