These -m options are defined for the MIPS family of computers:
-march=arch
mips1, mips2, mips3, mips4, mips32
and mips64. The processor names are: r2000,
r3000, r3900, r4000, vr4100, vr4300,
r4400, r4600, r4650, vr5000, r6000,
r8000, 4kc, 4kp, 5kc, 20kc,
orion, and sb1. 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.
-mips64
-march=mips64.
-mfused-madd
-mno-fused-madd
-mfp32
-mfp64
-mgp32
-mgp64
-mint64
-mlong32 for an
explanation of the default, and the width of pointers.
-mlong64
-mlong32 for an
explanation of the default, and the width of pointers.
-mlong32
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 Cygnus EABI; the others use 32-bit longs. Pointers
are the same size as longs, or the same size as integer registers,
whichever is smaller.
-mabi=32
-mabi=o64
-mabi=n32
-mabi=64
-mabi=eabi
-mabi=meabi
Note that there are two embedded ABIs: -mabi=eabi
selects the one defined by Cygnus while -meabi=meabi
selects the one defined by MIPS. Both these ABIs have
32-bit and 64-bit variants. Normally, GCC will generate
64-bit code when you select a 64-bit architecture, but you
can use -mgp32 to get 32-bit code instead.
-mmips-as
mips-tfile to
add normal debug information. This is the default for all
platforms except for the OSF/1 reference platform, using the OSF/rose
object format. If the either of the -gstabs or -gstabs+
switches are used, the mips-tfile program will encapsulate the
stabs within MIPS ECOFF.
-mgas
--with-gnu-as is used.
-msplit-addresses
-mno-split-addresses
-mrnames
-mno-rnames
-mrnames switch says to output code using the MIPS software
names for the registers, instead of the hardware names (ie, a0
instead of $4). The only known assembler that supports this option
is the Algorithmics assembler.
-mgpopt
-mno-gpopt
-mgpopt switch says to write all of the data declarations
before the instructions in the text section, this allows the MIPS
assembler to generate one word memory references instead of using two
words for short global or static data items. This is on by default if
optimization is selected.
-mstats
-mno-stats
-mstats switch
causes the compiler to emit one line to the standard error file to
print statistics about the program (number of registers saved, stack
size, etc.).
-mmemcpy
-mno-memcpy
-mmemcpy switch makes all block moves call the appropriate
string function (memcpy or bcopy) instead of possibly
generating inline code.
-mmips-tfile
-mno-mips-tfile
-mno-mips-tfile switch causes the compiler not
postprocess the object file with the mips-tfile program,
after the MIPS assembler has generated it to add debug support. If
mips-tfile is not run, then no local variables will be
available to the debugger. In addition, stage2 and
stage3 objects will have the temporary file names passed to the
assembler embedded in the object file, which means the objects will
not compare the same. The -mno-mips-tfile switch should only
be used when there are bugs in the mips-tfile program that
prevents compilation.
-msoft-float
-mhard-float
-mabicalls
-mno-abicalls
.abicalls,
.cpload, and .cprestore that some System V.4 ports use for
position independent code.
-mlong-calls
-mno-long-calls
JALR instruction, which requires
loading up a function's address into a register before the call.
You need to use this switch, if you call outside of the current
512 megabyte segment to functions that are not through pointers.
-mhalf-pic
-mno-half-pic
-membedded-pic
-mno-embedded-pic
-membedded-data
-mno-embedded-data
-muninit-const-in-rodata
-mno-uninit-const-in-rodata
-membedded-data, it will always store uninitialized
const variables in the read-only data section.
-msingle-float
-mdouble-float
-msingle-float switch tells gcc to assume that the floating
point coprocessor only supports single precision operations, as on the
r4650 chip. The -mdouble-float switch permits gcc to use
double precision operations. This is the default.
-mmad
-mno-mad
mad, madu and mul instructions,
as on the r4650 chip.
-m4650
-msingle-float, -mmad, and, at least for now,
-mcpu=r4650.
-mips16
-mno-mips16
-mentry
-mips16.
-EL
-EB
-G num
-G num switch is also passed to the assembler and linker.
All modules should be compiled with the same -G num
value.
-nocpp
.s suffix) when assembling them.
-mfix7000
-no-crt0
-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