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

📄 i386-arch.html

📁 gcc手册
💻 HTML
字号:
<html lang="en">

<head>

<title>Using as</title>

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

<meta name="description" content="Using as">

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

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

</head>

<body>

<div class="node">

<p>

Node:<a name="i386-Arch">i386-Arch</a>,

Next:<a rel="next" accesskey="n" href="i386-Bugs.html#i386-Bugs">i386-Bugs</a>,

Previous:<a rel="previous" accesskey="p" href="i386-16bit.html#i386-16bit">i386-16bit</a>,

Up:<a rel="up" accesskey="u" href="i386-Dependent.html#i386-Dependent">i386-Dependent</a>

<hr><br>

</div>



<h4 class="section">Specifying CPU Architecture</h4>



   <p><code>as</code> may be told to assemble for a particular CPU

architecture with the <code>.arch </code><var>cpu_type</var><code></code> directive.  This

directive enables a warning when gas detects an instruction that is not

supported on the CPU specified.  The choices for <var>cpu_type</var> are:



   <p><table><tr align="left"><td valign="top"><code>i8086</code> </td><td valign="top"><code>i186</code> </td><td valign="top"><code>i286</code> </td><td valign="top"><code>i386</code>

<br></td></tr><tr align="left"><td valign="top"><code>i486</code> </td><td valign="top"><code>i586</code> </td><td valign="top"><code>i686</code> </td><td valign="top"><code>pentium</code>

<br></td></tr><tr align="left"><td valign="top"><code>pentiumpro</code> </td><td valign="top"><code>pentium4</code> </td><td valign="top"><code>k6</code> </td><td valign="top"><code>athlon</code>

<br></td></tr><tr align="left"><td valign="top"><code>sledgehammer</code>

   <br></td></tr></table>



   <p>Apart from the warning, there are only two other effects on

<code>as</code> operation;  Firstly, if you specify a CPU other than

<code>i486</code>, then shift by one instructions such as <code>sarl $1, %eax</code>

will automatically use a two byte opcode sequence.  The larger three

byte opcode sequence is used on the 486 (and when no architecture is

specified) because it executes faster on the 486.  Note that you can

explicitly request the two byte opcode by writing <code>sarl %eax</code>. 

Secondly, if you specify <code>i8086</code>, <code>i186</code>, or <code>i286</code>,

<em>and</em> <code>.code16</code> or <code>.code16gcc</code> then byte offset

conditional jumps will be promoted when necessary to a two instruction

sequence consisting of a conditional jump of the opposite sense around

an unconditional jump to the target.



   <p>Following the CPU architecture, you may specify <code>jumps</code> or

<code>nojumps</code> to control automatic promotion of conditional jumps. 

<code>jumps</code> is the default, and enables jump promotion;  All external

jumps will be of the long variety, and file-local jumps will be promoted

as necessary.  (see <a href="i386-Jumps.html#i386-Jumps">i386-Jumps</a>)  <code>nojumps</code> leaves external

conditional jumps as byte offset jumps, and warns about file-local

conditional jumps that <code>as</code> promotes. 

Unconditional jumps are treated as for <code>jumps</code>.



   <p>For example



<pre class="smallexample">      .arch i8086,nojumps

     </pre>



   </body></html>



⌨️ 快捷键说明

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