213 lines
6.0 KiB
HTML
213 lines
6.0 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<!-- This HTML file has been created by texi2html 1.52
|
|
from ../texi/as.texinfo on 24 April 1999 -->
|
|
|
|
<TITLE>Using as - SPARC Dependent Features</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
Go to the <A HREF="as_1.html">first</A>, <A HREF="as_20.html">previous</A>, <A HREF="as_22.html">next</A>, <A HREF="as_27.html">last</A> section, <A HREF="as_toc.html">table of contents</A>.
|
|
<P><HR><P>
|
|
|
|
|
|
<H1><A NAME="SEC240" HREF="as_toc.html#TOC240">SPARC Dependent Features</A></H1>
|
|
|
|
<P>
|
|
<A NAME="IDX760"></A>
|
|
|
|
</P>
|
|
|
|
|
|
<H2><A NAME="SEC241" HREF="as_toc.html#TOC241">Options</A></H2>
|
|
|
|
<P>
|
|
<A NAME="IDX761"></A>
|
|
<A NAME="IDX762"></A>
|
|
<A NAME="IDX763"></A>
|
|
<A NAME="IDX764"></A>
|
|
The SPARC chip family includes several successive levels, using the same
|
|
core instruction set, but including a few additional instructions at
|
|
each level. There are exceptions to this however. For details on what
|
|
instructions each variant supports, please see the chip's architecture
|
|
reference manual.
|
|
|
|
</P>
|
|
<P>
|
|
By default, <CODE>as</CODE> assumes the core instruction set (SPARC
|
|
v6), but "bumps" the architecture level as needed: it switches to
|
|
successively higher architectures as it encounters instructions that
|
|
only exist in the higher levels.
|
|
|
|
</P>
|
|
<P>
|
|
If not configured for SPARC v9 (<CODE>sparc64-*-*</CODE>) GAS will not bump
|
|
passed sparclite by default, an option must be passed to enable the
|
|
v9 instructions.
|
|
|
|
</P>
|
|
<P>
|
|
GAS treats sparclite as being compatible with v8, unless an architecture
|
|
is explicitly requested. SPARC v9 is always incompatible with sparclite.
|
|
|
|
</P>
|
|
|
|
<DL COMPACT>
|
|
|
|
<DT><CODE>-Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite</CODE>
|
|
<DD>
|
|
<A NAME="IDX765"></A>
|
|
<A NAME="IDX766"></A>
|
|
<A NAME="IDX767"></A>
|
|
<A NAME="IDX768"></A>
|
|
<A NAME="IDX769"></A>
|
|
<A NAME="IDX770"></A>
|
|
<A NAME="IDX771"></A>
|
|
|
|
<DT><CODE>-Av8plus | -Av8plusa | -Av9 | -Av9a</CODE>
|
|
<DD>
|
|
Use one of the <SAMP>`-A'</SAMP> options to select one of the SPARC
|
|
architectures explicitly. If you select an architecture explicitly,
|
|
<CODE>as</CODE> reports a fatal error if it encounters an instruction
|
|
or feature requiring an incompatible or higher level.
|
|
|
|
<SAMP>`-Av8plus'</SAMP> and <SAMP>`-Av8plusa'</SAMP> select a 32 bit environment.
|
|
|
|
<SAMP>`-Av9'</SAMP> and <SAMP>`-Av9a'</SAMP> select a 64 bit environment and are not
|
|
available unless GAS is explicitly configured with 64 bit environment
|
|
support.
|
|
|
|
<SAMP>`-Av8plusa'</SAMP> and <SAMP>`-Av9a'</SAMP> enable the SPARC V9 instruction set with
|
|
UltraSPARC extensions.
|
|
|
|
<DT><CODE>-xarch=v8plus | -xarch=v8plusa</CODE>
|
|
<DD>
|
|
For compatibility with the Solaris v9 assembler. These options are
|
|
equivalent to -Av8plus and -Av8plusa, respectively.
|
|
|
|
<DT><CODE>-bump</CODE>
|
|
<DD>
|
|
Warn whenever it is necessary to switch to another level.
|
|
If an architecture level is explicitly requested, GAS will not issue
|
|
warnings until that level is reached, and will then bump the level
|
|
as required (except between incompatible levels).
|
|
|
|
<DT><CODE>-32 | -64</CODE>
|
|
<DD>
|
|
Select the word size, either 32 bits or 64 bits.
|
|
These options are only available with the ELF object file format,
|
|
and require that the necessary BFD support has been included.
|
|
</DL>
|
|
|
|
|
|
|
|
<H2><A NAME="SEC242" HREF="as_toc.html#TOC242">Enforcing aligned data</A></H2>
|
|
|
|
<P>
|
|
<A NAME="IDX772"></A>
|
|
<A NAME="IDX773"></A>
|
|
SPARC GAS normally permits data to be misaligned. For example, it
|
|
permits the <CODE>.long</CODE> pseudo-op to be used on a byte boundary.
|
|
However, the native SunOS and Solaris assemblers issue an error when
|
|
they see misaligned data.
|
|
|
|
</P>
|
|
<P>
|
|
<A NAME="IDX774"></A>
|
|
You can use the <CODE>--enforce-aligned-data</CODE> option to make SPARC GAS
|
|
also issue an error about misaligned data, just as the SunOS and Solaris
|
|
assemblers do.
|
|
|
|
</P>
|
|
<P>
|
|
The <CODE>--enforce-aligned-data</CODE> option is not the default because gcc
|
|
issues misaligned data pseudo-ops when it initializes certain packed
|
|
data structures (structures defined using the <CODE>packed</CODE> attribute).
|
|
You may have to assemble with GAS in order to initialize packed data
|
|
structures in your own code.
|
|
|
|
</P>
|
|
|
|
|
|
|
|
<H2><A NAME="SEC243" HREF="as_toc.html#TOC243">Floating Point</A></H2>
|
|
|
|
<P>
|
|
<A NAME="IDX775"></A>
|
|
<A NAME="IDX776"></A>
|
|
The Sparc uses IEEE floating-point numbers.
|
|
|
|
</P>
|
|
|
|
|
|
<H2><A NAME="SEC244" HREF="as_toc.html#TOC244">Sparc Machine Directives</A></H2>
|
|
|
|
<P>
|
|
<A NAME="IDX777"></A>
|
|
<A NAME="IDX778"></A>
|
|
The Sparc version of <CODE>as</CODE> supports the following additional
|
|
machine directives:
|
|
|
|
</P>
|
|
<DL COMPACT>
|
|
|
|
<DT><CODE>.align</CODE>
|
|
<DD>
|
|
<A NAME="IDX779"></A>
|
|
|
|
This must be followed by the desired alignment in bytes.
|
|
|
|
<A NAME="IDX780"></A>
|
|
<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.
|
|
|
|
<A NAME="IDX781"></A>
|
|
<DT><CODE>.half</CODE>
|
|
<DD>
|
|
This is functionally identical to <CODE>.short</CODE>.
|
|
|
|
<A NAME="IDX782"></A>
|
|
<DT><CODE>.proc</CODE>
|
|
<DD>
|
|
This directive is ignored. Any text following it on the same
|
|
line is also ignored.
|
|
|
|
<A NAME="IDX783"></A>
|
|
<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.
|
|
|
|
<A NAME="IDX784"></A>
|
|
<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>.
|
|
|
|
<A NAME="IDX785"></A>
|
|
<DT><CODE>.skip</CODE>
|
|
<DD>
|
|
This is functionally identical to the <CODE>.space</CODE> directive.
|
|
|
|
<A NAME="IDX786"></A>
|
|
<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.
|
|
|
|
<A NAME="IDX787"></A>
|
|
<DT><CODE>.xword</CODE>
|
|
<DD>
|
|
On the Sparc V9 processor, the <CODE>.xword</CODE> directive produces
|
|
64 bit values.
|
|
</DL>
|
|
|
|
<P><HR><P>
|
|
Go to the <A HREF="as_1.html">first</A>, <A HREF="as_20.html">previous</A>, <A HREF="as_22.html">next</A>, <A HREF="as_27.html">last</A> section, <A HREF="as_toc.html">table of contents</A>.
|
|
</BODY>
|
|
</HTML>
|