These -m
options are defined for Advanced RISC Machines (ARM)
architectures:
-mapcs-frame
-fomit-frame-pointer
with this option will cause the stack frames not to be generated for
leaf functions. The default is -mno-apcs-frame
.
-mapcs
-mapcs-frame
.
-mapcs-26
-m2
and -m3
options
of previous releases of the compiler.
-mapcs-32
-m6
option of previous releases
of the compiler.
-mthumb-interwork
-mno-thumb-interwork
, since slightly larger code is generated
when -mthumb-interwork
is specified.
-mno-sched-prolog
-msched-prolog
.
-mhard-float
-msoft-float
-msoft-float
changes the calling convention in the output file;
therefore, it is only useful if you compile all of a program with
this option. In particular, you need to compile libgcc.a
, the
library that comes with GCC, with -msoft-float
in order for
this to work.
-mlittle-endian
-mbig-endian
-mwords-little-endian
32107654
. Note: this
option should only be used if you require compatibility with code for
big-endian ARM processors generated by versions of the compiler prior to
2.8.
-malignment-traps
This option is ignored when compiling for ARM architecture 4 or later,
since these processors have instructions to directly access half-word
objects in memory.
-mno-alignment-traps
Note that you cannot use this option to access unaligned word objects, since the processor will only fetch one 32-bit aligned object from memory.
The default setting for most targets is -mno-alignment-traps
, since
this produces better code when there are no half-word memory
instructions available.
-mshort-load-bytes
-mno-short-load-words
-malignment-traps
.
-mno-short-load-bytes
-mshort-load-words
-mno-alignment-traps
.
-mcpu=
name
arm2
, arm250
,
arm3
, arm6
, arm60
, arm600
, arm610
,
arm620
, arm7
, arm7m
, arm7d
, arm7dm
,
arm7di
, arm7dmi
, arm70
, arm700
,
arm700i
, arm710
, arm710c
, arm7100
,
arm7500
, arm7500fe
, arm7tdmi
, arm8
,
strongarm
, strongarm110
, strongarm1100
,
arm8
, arm810
, arm9
, arm9e
, arm920
,
arm920t
, arm940t
, arm9tdmi
, arm10tdmi
,
arm1020t
, xscale
.
-mtune=
name
-mcpu=
option, except that
instead of specifying the actual target processor type, and hence
restricting which instructions can be used, it specifies that GCC should
tune the performance of the code as if the target were of the type
specified in this option, but still choosing the instructions that it
will generate based on the cpu specified by a -mcpu=
option.
For some ARM implementations better performance can be obtained by using
this option.
-march=
name
-mcpu=
option. Permissible names are: armv2
,
armv2a
, armv3
, armv3m
, armv4
, armv4t
,
armv5
, armv5t
, armv5te
.
-mfpe=
number
-mfp=
number
-mfp=
is a synonym
for -mfpe=
, for compatibility with older versions of GCC.
-mstructure-size-boundary=
n
-mabort-on-noreturn
abort
at the end of a
noreturn
function. It will be executed if the function tries to
return.
-mlong-calls
-mno-long-calls
Even if this switch is enabled, not all function calls will be turned
into long calls. The heuristic is that static functions, functions
which have the short-call
attribute, functions that are inside
the scope of a #pragma no_long_calls
directive and functions whose
definitions have already been compiled within the current compilation
unit, will not be turned into long calls. The exception to this rule is
that weak function definitions, functions with the long-call
attribute or the section
attribute, and functions that are within
the scope of a #pragma long_calls
directive, will always be
turned into long calls.
This feature is not enabled by default. Specifying
-mno-long-calls
will restore the default behavior, as will
placing the function calls within the scope of a #pragma
long_calls_off
directive. Note these switches have no effect on how
the compiler generates code to handle function calls via function
pointers.
-mnop-fun-dllimport
dllimport
attribute.
-msingle-pic-base
-mpic-register=
reg
-mpoke-function-name
t0 .ascii "arm_poke_function_name", 0 .align t1 .word 0xff000000 + (t1 - t0) arm_poke_function_name mov ip, sp stmfd sp!, {fp, ip, lr, pc} sub fp, ip, #4
When performing a stack backtrace, code can inspect the value of
pc
stored at fp + 0
. If the trace function then looks at
location pc - 12
and the top 8 bits are set, then we know that
there is a function name embedded immediately preceding this location
and has length ((pc[-3]) & 0xff000000)
.
-mthumb
-mtpcs-frame
-mno-tpcs-frame
.
-mtpcs-leaf-frame
-mno-apcs-leaf-frame
.
-mcallee-super-interworking
-mcaller-super-interworking