⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arm-options.html

📁 gcc手册
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html lang="en">

<head>

<title>Using the GNU Compiler Collection (GCC)</title>

<meta http-equiv="Content-Type" content="text/html">

<meta name="description" content="Using the GNU Compiler Collection (GCC)">

<meta name="generator" content="makeinfo 4.3">

<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">

<!--

Copyright &copy; 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,

1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.



   <p>Permission is granted to copy, distribute and/or modify this document

under the terms of the GNU Free Documentation License, Version 1.2 or

any later version published by the Free Software Foundation; with the

Invariant Sections being "GNU General Public License" and "Funding

Free Software", the Front-Cover texts being (a) (see below), and with

the Back-Cover Texts being (b) (see below).  A copy of the license is

included in the section entitled "GNU Free Documentation License".



   <p>(a) The FSF's Front-Cover Text is:



   <p>A GNU Manual



   <p>(b) The FSF's Back-Cover Text is:



   <p>You have freedom to copy and modify this GNU Manual, like GNU

     software.  Copies published by the Free Software Foundation raise

     funds for GNU development.-->

</head>

<body>

<div class="node">

<p>

Node:<a name="ARM%20Options">ARM Options</a>,

Next:<a rel="next" accesskey="n" href="MN10200-Options.html#MN10200%20Options">MN10200 Options</a>,

Previous:<a rel="previous" accesskey="p" href="SPARC-Options.html#SPARC%20Options">SPARC Options</a>,

Up:<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel%20Options">Submodel Options</a>

<hr><br>

</div>



<h4 class="subsection">ARM Options</h4>



   <p>These <code>-m</code> options are defined for Advanced RISC Machines (ARM)

architectures:



     <dl>

<dt><code>-mapcs-frame</code>

     <dd>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 <code>-fomit-frame-pointer</code>

with this option will cause the stack frames not to be generated for

leaf functions.  The default is <code>-mno-apcs-frame</code>.



     <br><dt><code>-mapcs</code>

     <dd>This is a synonym for <code>-mapcs-frame</code>.



     <br><dt><code>-mapcs-26</code>

     <dd>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 <code>-m2</code> and <code>-m3</code> options

of previous releases of the compiler.



     <br><dt><code>-mapcs-32</code>

     <dd>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 <code>-m6</code> option of previous releases

of the compiler.



     <br><dt><code>-mthumb-interwork</code>

     <dd>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

<code>-mno-thumb-interwork</code>, since slightly larger code is generated

when <code>-mthumb-interwork</code> is specified.



     <br><dt><code>-mno-sched-prolog</code>

     <dd>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 <code>-msched-prolog</code>.



     <br><dt><code>-mhard-float</code>

     <dd>Generate output containing floating point instructions.  This is the

default.



     <br><dt><code>-msoft-float</code>

     <dd>Generate output containing library calls for floating point. 

<strong>Warning:</strong> 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.



     <p><code>-msoft-float</code> changes the calling convention in the output file;

therefore, it is only useful if you compile <em>all</em> of a program with

this option.  In particular, you need to compile <code>libgcc.a</code>, the

library that comes with GCC, with <code>-msoft-float</code> in order for

this to work.



     <br><dt><code>-mlittle-endian</code>

     <dd>Generate code for a processor running in little-endian mode.  This is

the default for all standard configurations.



     <br><dt><code>-mbig-endian</code>

     <dd>Generate code for a processor running in big-endian mode; the default is

to compile code for a little-endian processor.



     <br><dt><code>-mwords-little-endian</code>

     <dd>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 <code>32107654</code>.  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.



     <br><dt><code>-malignment-traps</code>

     <dd>Generate code that will not trap if the MMU has alignment traps enabled. 

On ARM architectures prior to ARMv4, there were no instructions to

access half-word objects stored in memory.  However, when reading from

memory a feature of the ARM architecture allows a word load to be used,

even if the address is unaligned, and the processor core will rotate the

data as it is being loaded.  This option tells the compiler that such

misaligned accesses will cause a MMU trap and that it should instead

synthesize the access as a series of byte accesses.  The compiler can

still use word accesses to load half-word data if it knows that the

address is aligned to a word boundary.



     <p>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.



     <br><dt><code>-mno-alignment-traps</code>

     <dd>Generate code that assumes that the MMU will not trap unaligned

accesses.  This produces better code when the target instruction set

does not have half-word memory operations (i.e. implementations prior to

ARMv4).



     <p>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.



     <p>The default setting for most targets is <code>-mno-alignment-traps</code>, since

this produces better code when there are no half-word memory

instructions available.



     <br><dt><code>-mshort-load-bytes</code>

     <dd><dt><code>-mno-short-load-words</code>

     <dd>These are deprecated aliases for <code>-malignment-traps</code>.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -