ARM Options Contents|Index|Previous|Next
 

ARM options  

The following ‘-m’ options are defined for Advanced RISC Machines (ARM) architectures.
-mapcs-frame
    Generate a stack frame that is compliant with the ARM Procedure Call Standard for all functions, even if this is not strictly necessary for correct execution of the code. Specifying -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
    This is a synonym for -mapcs-frame.
     
-mapcs-26
    Generate code for a processor running with a 26-bit program counter, and conforming to the function calling standards for the APCS 26-bit option. This option replaces the ‘-m2’ and ‘-m3’ options of previous releases of the compiler.
     
-mapcs-32
    Generate code for a processor running with a 32-bit program counter, and conforming to the function calling standards for the APCS 32-bit option. This option replaces the ‘-m6’ option of previous releases of the compiler.
     
-mapcs-stack-check
Generate code to check the amount of stack space available upon entry to every function (that actually uses some stack space). If there is insufficient space available then either the function, __rt_stkovf_split_small, or __rt_stkovf_split_big, will be called, depending upon the amount of stack space required. The run time system is required to provide these functions. The default is -mno-apcs-stack-check, since this produces smaller code.
 
-mapcs-float
    Pass floating point arguments using the float point registers. This is one of the variants of the APCS. This option is reccommended if the target hardware has a floating point unit or if a lot of floating point arithmetic is going to be performed by the code. The default is -mno-apcs-float, since integer only
    code is slightly increased in size if -mapcs-float is used.
     
-mapcs-reentrant
Generate reentrant, position independent code. This is the equivalent to specifying the -fpic option. The default is -mno-apcs-reentrant.
 
-mthumb-interwork
Generate code which supports calling between the ARM and THUMB instruction sets. Without this option the two instruction sets cannot be reliably used inside one program. The default is -mno-thumb-interwork, since slightly larger code is generated when -mthumb-interwork is specified.
 
-mno-sched-prolog
    Prevent the reordering of instructions in the function prolog, or the merging of those instruction with the instructions in the function’s body. This means that all functions will start with a recognizable set of instructions (or, in fact, one of a choice from a small set of different function prologues), and this information can be used to locate the start if functions inside an executable piece of code.
    The default is -msched-prolog.
     
-mhard-float
    Generate output containing floating point instructions. This is the default.
     
-msoft-float
    Generate output containing library calls for floating point.
     
       Warning:
      The requisite libraries are not available for all ARM targets. Normally the facilities of the machine’s usual C compiler are used, but this cannot be done directly in cross-compilation. You must make your own arrangements to provide suitable library functions for cross-compilation.
     
    -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 GNU CC, with -msoft-float in order for this to work.
-mlittle-endian
    Generate code for a processor running in little-endian mode. This is the default for all standard configurations.
     
-mbig-endian
    Generate code for a processor running in big-endian mode; the default is to compile code for a little-endian processor.
     
-mwords-little-endian
    This option only applies when generating code for big-endian processors. Generate code for a little-endian word order but a big-endian byte order. That is, a byte order of the form, 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.
 
© 2004 Red Hat, Inc. All rights reserved.
About Red Hat  :  Legal statement  :  Privacy statement  :  Contact Red Hat