1
0
Fork 0
This repository has been archived on 2019-12-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
arduinisten/arduino-0018-windows/hardware/tools/avr/doc/binutils/as.html/MMIX_002dExpand.html

74 lines
3.5 KiB
HTML
Raw Normal View History

2010-03-30 21:53:44 +02:00
<html lang="en">
<head>
<title>MMIX-Expand - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.7">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="MMIX_002dDependent.html#MMIX_002dDependent" title="MMIX-Dependent">
<link rel="prev" href="MMIX_002dOpts.html#MMIX_002dOpts" title="MMIX-Opts">
<link rel="next" href="MMIX_002dSyntax.html#MMIX_002dSyntax" title="MMIX-Syntax">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002,
2006, 2007 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled ``GNU Free Documentation License''.
man end-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family: serif; font-weight: normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="MMIX_002dExpand"></a>Next:&nbsp;<a rel="next" accesskey="n" href="MMIX_002dSyntax.html#MMIX_002dSyntax">MMIX-Syntax</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="MMIX_002dOpts.html#MMIX_002dOpts">MMIX-Opts</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="MMIX_002dDependent.html#MMIX_002dDependent">MMIX-Dependent</a>
<hr><br>
</div>
<h4 class="subsection">9.23.2 Instruction expansion</h4>
<p><a name="index-instruction-expansion_002c-MMIX-1263"></a>When <code>as</code> encounters an instruction with an operand that is
either not known or does not fit the operand size of the instruction,
<code>as</code> (and <code>ld</code>) will expand the instruction into
a sequence of instructions semantically equivalent to the operand fitting
the instruction. Expansion will take place for the following
instructions:
<dl>
<dt><span class="samp">GETA</span><dd>Expands to a sequence of four instructions: <code>SETL</code>, <code>INCML</code>,
<code>INCMH</code> and <code>INCH</code>. The operand must be a multiple of four.
<br><dt>Conditional branches<dd>A branch instruction is turned into a branch with the complemented
condition and prediction bit over five instructions; four instructions
setting <code>$255</code> to the operand value, which like with <code>GETA</code> must
be a multiple of four, and a final <code>GO $255,$255,0</code>.
<br><dt><span class="samp">PUSHJ</span><dd>Similar to expansion for conditional branches; four instructions set
<code>$255</code> to the operand value, followed by a <code>PUSHGO $255,$255,0</code>.
<br><dt><span class="samp">JMP</span><dd>Similar to conditional branches and <code>PUSHJ</code>. The final instruction
is <code>GO $255,$255,0</code>.
</dl>
<p>The linker <code>ld</code> is expected to shrink these expansions for
code assembled with <span class="samp">--relax</span> (though not currently implemented).
</body></html>