📄 i386-jumps.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-Jumps">i386-Jumps</a>,
Next:<a rel="next" accesskey="n" href="i386-Float.html#i386-Float">i386-Float</a>,
Previous:<a rel="previous" accesskey="p" href="i386-Memory.html#i386-Memory">i386-Memory</a>,
Up:<a rel="up" accesskey="u" href="i386-Dependent.html#i386-Dependent">i386-Dependent</a>
<hr><br>
</div>
<h4 class="section">Handling of Jump Instructions</h4>
<p>Jump instructions are always optimized to use the smallest possible
displacements. This is accomplished by using byte (8-bit) displacement
jumps whenever the target is sufficiently close. If a byte displacement
is insufficient a long displacement is used. We do not support
word (16-bit) displacement jumps in 32-bit mode (i.e. prefixing the jump
instruction with the <code>data16</code> instruction prefix), since the 80386
insists upon masking <code>%eip</code> to 16 bits after the word displacement
is added. (See also see <a href="i386-Arch.html#i386-Arch">i386-Arch</a>)
<p>Note that the <code>jcxz</code>, <code>jecxz</code>, <code>loop</code>, <code>loopz</code>,
<code>loope</code>, <code>loopnz</code> and <code>loopne</code> instructions only come in byte
displacements, so that if you use these instructions (<code>gcc</code> does
not use them) you may get an error message (and incorrect code). The AT&T
80386 assembler tries to get around this problem by expanding <code>jcxz foo</code>
to
<pre class="smallexample"> jcxz cx_zero
jmp cx_nonzero
cx_zero: jmp foo
cx_nonzero:
</pre>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -