sparc-directives.html

来自「gcc手册」· HTML 代码 · 共 77 行

HTML
77
字号
<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="Sparc-Directives">Sparc-Directives</a>,

Previous:<a rel="previous" accesskey="p" href="Sparc-Float.html#Sparc-Float">Sparc-Float</a>,

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

<hr><br>

</div>



<h4 class="section">Sparc Machine Directives</h4>



   <p>The Sparc version of <code>as</code> supports the following additional

machine directives:



     <dl>

<dt><code>.align</code>

     <dd>This must be followed by the desired alignment in bytes.



     <br><dt><code>.common</code>

     <dd>This must be followed by a symbol name, a positive number, and

<code>"bss"</code>.  This behaves somewhat like <code>.comm</code>, but the

syntax is different.



     <br><dt><code>.half</code>

     <dd>This is functionally identical to <code>.short</code>.



     <br><dt><code>.nword</code>

     <dd>On the Sparc, the <code>.nword</code> directive produces native word sized value,

ie. if assembling with -32 it is equivalent to <code>.word</code>, if assembling

with -64 it is equivalent to <code>.xword</code>.



     <br><dt><code>.proc</code>

     <dd>This directive is ignored.  Any text following it on the same

line is also ignored.



     <br><dt><code>.register</code>

     <dd>This directive declares use of a global application or system register. 

It must be followed by a register name %g2, %g3, %g6 or %g7, comma and

the symbol name for that register.  If symbol name is <code>#scratch</code>,

it is a scratch register, if it is <code>#ignore</code>, it just surpresses any

errors about using undeclared global register, but does not emit any

information about it into the object file.  This can be useful e.g. if you

save the register before use and restore it after.



     <br><dt><code>.reserve</code>

     <dd>This must be followed by a symbol name, a positive number, and

<code>"bss"</code>.  This behaves somewhat like <code>.lcomm</code>, but the

syntax is different.



     <br><dt><code>.seg</code>

     <dd>This must be followed by <code>"text"</code>, <code>"data"</code>, or

<code>"data1"</code>.  It behaves like <code>.text</code>, <code>.data</code>, or

<code>.data 1</code>.



     <br><dt><code>.skip</code>

     <dd>This is functionally identical to the <code>.space</code> directive.



     <br><dt><code>.word</code>

     <dd>On the Sparc, the <code>.word</code> directive produces 32 bit values,

instead of the 16 bit values it produces on many other machines.



     <br><dt><code>.xword</code>

     <dd>On the Sparc V9 processor, the <code>.xword</code> directive produces

64 bit values. 

</dl>



   </body></html>



⌨️ 快捷键说明

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