160 lines
		
	
	
	
		
			8.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
		
		
			
		
	
	
			160 lines
		
	
	
	
		
			8.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| 
								 | 
							
								<html lang="en">
							 | 
						||
| 
								 | 
							
								<head>
							 | 
						||
| 
								 | 
							
								<title>Alpha Directives - 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="Alpha_002dDependent.html#Alpha_002dDependent" title="Alpha-Dependent">
							 | 
						||
| 
								 | 
							
								<link rel="prev" href="Alpha-Floating-Point.html#Alpha-Floating-Point" title="Alpha Floating Point">
							 | 
						||
| 
								 | 
							
								<link rel="next" href="Alpha-Opcodes.html#Alpha-Opcodes" title="Alpha Opcodes">
							 | 
						||
| 
								 | 
							
								<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="Alpha-Directives"></a>Next: <a rel="next" accesskey="n" href="Alpha-Opcodes.html#Alpha-Opcodes">Alpha Opcodes</a>,
							 | 
						||
| 
								 | 
							
								Previous: <a rel="previous" accesskey="p" href="Alpha-Floating-Point.html#Alpha-Floating-Point">Alpha Floating Point</a>,
							 | 
						||
| 
								 | 
							
								Up: <a rel="up" accesskey="u" href="Alpha_002dDependent.html#Alpha_002dDependent">Alpha-Dependent</a>
							 | 
						||
| 
								 | 
							
								<hr><br>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<h4 class="subsection">9.1.5 Alpha Assembler Directives</h4>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<p><span class="command">as</span> for the Alpha supports many additional directives for
							 | 
						||
| 
								 | 
							
								compatibility with the native assembler.  This section describes them only
							 | 
						||
| 
								 | 
							
								briefly.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								   <p><a name="index-Alpha_002donly-directives-531"></a>These are the additional directives in <code>as</code> for the Alpha:
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <dl>
							 | 
						||
| 
								 | 
							
								<dt><code>.arch </code><var>cpu</var><dd>Specifies the target processor.  This is equivalent to the
							 | 
						||
| 
								 | 
							
								<span class="option">-m</span><var>cpu</var> command-line option.  See <a href="Alpha-Options.html#Alpha-Options">Options</a>,
							 | 
						||
| 
								 | 
							
								for a list of values for <var>cpu</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.ent </code><var>function</var><code>[, </code><var>n</var><code>]</code><dd>Mark the beginning of <var>function</var>.  An optional number may follow for
							 | 
						||
| 
								 | 
							
								compatibility with the OSF/1 assembler, but is ignored.  When generating
							 | 
						||
| 
								 | 
							
								<code>.mdebug</code> information, this will create a procedure descriptor for
							 | 
						||
| 
								 | 
							
								the function.  In ELF, it will mark the symbol as a function a-la the
							 | 
						||
| 
								 | 
							
								generic <code>.type</code> directive.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.end </code><var>function</var><dd>Mark the end of <var>function</var>.  In ELF, it will set the size of the symbol
							 | 
						||
| 
								 | 
							
								a-la the generic <code>.size</code> directive.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.mask </code><var>mask</var><code>, </code><var>offset</var><dd>Indicate which of the integer registers are saved in the current
							 | 
						||
| 
								 | 
							
								function's stack frame.  <var>mask</var> is interpreted a bit mask in which
							 | 
						||
| 
								 | 
							
								bit <var>n</var> set indicates that register <var>n</var> is saved.  The registers
							 | 
						||
| 
								 | 
							
								are saved in a block located <var>offset</var> bytes from the <dfn>canonical
							 | 
						||
| 
								 | 
							
								frame address</dfn> (CFA) which is the value of the stack pointer on entry to
							 | 
						||
| 
								 | 
							
								the function.  The registers are saved sequentially, except that the
							 | 
						||
| 
								 | 
							
								return address register (normally <code>$26</code>) is saved first.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p>This and the other directives that describe the stack frame are
							 | 
						||
| 
								 | 
							
								currently only used when generating <code>.mdebug</code> information.  They
							 | 
						||
| 
								 | 
							
								may in the future be used to generate DWARF2 <code>.debug_frame</code> unwind
							 | 
						||
| 
								 | 
							
								information for hand written assembly.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.fmask </code><var>mask</var><code>, </code><var>offset</var><dd>Indicate which of the floating-point registers are saved in the current
							 | 
						||
| 
								 | 
							
								stack frame.  The <var>mask</var> and <var>offset</var> parameters are interpreted
							 | 
						||
| 
								 | 
							
								as with <code>.mask</code>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.frame </code><var>framereg</var><code>, </code><var>frameoffset</var><code>, </code><var>retreg</var><code>[, </code><var>argoffset</var><code>]</code><dd>Describes the shape of the stack frame.  The frame pointer in use is
							 | 
						||
| 
								 | 
							
								<var>framereg</var>; normally this is either <code>$fp</code> or <code>$sp</code>.  The
							 | 
						||
| 
								 | 
							
								frame pointer is <var>frameoffset</var> bytes below the CFA.  The return
							 | 
						||
| 
								 | 
							
								address is initially located in <var>retreg</var> until it is saved as
							 | 
						||
| 
								 | 
							
								indicated in <code>.mask</code>.  For compatibility with OSF/1 an optional
							 | 
						||
| 
								 | 
							
								<var>argoffset</var> parameter is accepted and ignored.  It is believed to
							 | 
						||
| 
								 | 
							
								indicate the offset from the CFA to the saved argument registers.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.prologue </code><var>n</var><dd>Indicate that the stack frame is set up and all registers have been
							 | 
						||
| 
								 | 
							
								spilled.  The argument <var>n</var> indicates whether and how the function
							 | 
						||
| 
								 | 
							
								uses the incoming <dfn>procedure vector</dfn> (the address of the called
							 | 
						||
| 
								 | 
							
								function) in <code>$27</code>.  0 indicates that <code>$27</code> is not used; 1
							 | 
						||
| 
								 | 
							
								indicates that the first two instructions of the function use <code>$27</code>
							 | 
						||
| 
								 | 
							
								to perform a load of the GP register; 2 indicates that <code>$27</code> is
							 | 
						||
| 
								 | 
							
								used in some non-standard way and so the linker cannot elide the load of
							 | 
						||
| 
								 | 
							
								the procedure vector during relaxation.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.usepv </code><var>function</var><code>, </code><var>which</var><dd>Used to indicate the use of the <code>$27</code> register, similar to
							 | 
						||
| 
								 | 
							
								<code>.prologue</code>, but without the other semantics of needing to
							 | 
						||
| 
								 | 
							
								be inside an open <code>.ent</code>/<code>.end</code> block.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p>The <var>which</var> argument should be either <code>no</code>, indicating that
							 | 
						||
| 
								 | 
							
								<code>$27</code> is not used, or <code>std</code>, indicating that the first two
							 | 
						||
| 
								 | 
							
								instructions of the function perform a GP load.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p>One might use this directive instead of <code>.prologue</code> if you are
							 | 
						||
| 
								 | 
							
								also using dwarf2 CFI directives.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.gprel32 </code><var>expression</var><dd>Computes the difference between the address in <var>expression</var> and the
							 | 
						||
| 
								 | 
							
								GP for the current object file, and stores it in 4 bytes.  In addition
							 | 
						||
| 
								 | 
							
								to being smaller than a full 8 byte address, this also does not require
							 | 
						||
| 
								 | 
							
								a dynamic relocation when used in a shared library.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.t_floating </code><var>expression</var><dd>Stores <var>expression</var> as an <span class="sc">ieee</span> double precision value.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.s_floating </code><var>expression</var><dd>Stores <var>expression</var> as an <span class="sc">ieee</span> single precision value.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.f_floating </code><var>expression</var><dd>Stores <var>expression</var> as a VAX F format value.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.g_floating </code><var>expression</var><dd>Stores <var>expression</var> as a VAX G format value.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.d_floating </code><var>expression</var><dd>Stores <var>expression</var> as a VAX D format value.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <br><dt><code>.set </code><var>feature</var><dd>Enables or disables various assembler features.  Using the positive
							 | 
						||
| 
								 | 
							
								name of the feature enables while using <span class="samp">no</span><var>feature</var> disables.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								          <dl>
							 | 
						||
| 
								 | 
							
								<dt><code>at</code><dd>Indicates that macro expansions may clobber the <dfn>assembler
							 | 
						||
| 
								 | 
							
								temporary</dfn> (<code>$at</code> or <code>$28</code>) register.  Some macros may not be
							 | 
						||
| 
								 | 
							
								expanded without this and will generate an error message if <code>noat</code>
							 | 
						||
| 
								 | 
							
								is in effect.  When <code>at</code> is in effect, a warning will be generated
							 | 
						||
| 
								 | 
							
								if <code>$at</code> is used by the programmer.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								          <br><dt><code>macro</code><dd>Enables the expansion of macro instructions.  Note that variants of real
							 | 
						||
| 
								 | 
							
								instructions, such as <code>br label</code> vs <code>br $31,label</code> are
							 | 
						||
| 
								 | 
							
								considered alternate forms and not macros.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								          <br><dt><code>move</code><dt><code>reorder</code><dt><code>volatile</code><dd>These control whether and how the assembler may re-order instructions. 
							 | 
						||
| 
								 | 
							
								Accepted for compatibility with the OSF/1 assembler, but <span class="command">as</span>
							 | 
						||
| 
								 | 
							
								does not do instruction scheduling, so these features are ignored. 
							 | 
						||
| 
								 | 
							
								</dl>
							 | 
						||
| 
								 | 
							
								     </dl>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								   <p>The following directives are recognized for compatibility with the OSF/1
							 | 
						||
| 
								 | 
							
								assembler but are ignored.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<pre class="example">     .proc           .aproc
							 | 
						||
| 
								 | 
							
								     .reguse         .livereg
							 | 
						||
| 
								 | 
							
								     .option         .aent
							 | 
						||
| 
								 | 
							
								     .ugen           .eflag
							 | 
						||
| 
								 | 
							
								     .alias          .noalias
							 | 
						||
| 
								 | 
							
								</pre>
							 | 
						||
| 
								 | 
							
								   </body></html>
							 | 
						||
| 
								 | 
							
								
							 |