You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
205 lines
8.8 KiB
HTML
205 lines
8.8 KiB
HTML
15 years ago
|
<html lang="en">
|
||
|
<head>
|
||
|
<title>Sparc-Regs - 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="Sparc_002dSyntax.html#Sparc_002dSyntax" title="Sparc-Syntax">
|
||
|
<link rel="prev" href="Sparc_002dChars.html#Sparc_002dChars" title="Sparc-Chars">
|
||
|
<link rel="next" href="Sparc_002dConstants.html#Sparc_002dConstants" title="Sparc-Constants">
|
||
|
<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="Sparc_002dRegs"></a>Next: <a rel="next" accesskey="n" href="Sparc_002dConstants.html#Sparc_002dConstants">Sparc-Constants</a>,
|
||
|
Previous: <a rel="previous" accesskey="p" href="Sparc_002dChars.html#Sparc_002dChars">Sparc-Chars</a>,
|
||
|
Up: <a rel="up" accesskey="u" href="Sparc_002dSyntax.html#Sparc_002dSyntax">Sparc-Syntax</a>
|
||
|
<hr><br>
|
||
|
</div>
|
||
|
|
||
|
<h5 class="subsubsection">9.30.3.2 Register Names</h5>
|
||
|
|
||
|
<p><a name="index-Sparc-registers-1514"></a><a name="index-register-names_002c-Sparc-1515"></a>
|
||
|
The Sparc integer register file is broken down into global,
|
||
|
outgoing, local, and incoming.
|
||
|
|
||
|
<ul>
|
||
|
<li>The 8 global registers are referred to as <span class="samp">%g</span><var>n</var>.
|
||
|
|
||
|
<li>The 8 outgoing registers are referred to as <span class="samp">%o</span><var>n</var>.
|
||
|
|
||
|
<li>The 8 local registers are referred to as <span class="samp">%l</span><var>n</var>.
|
||
|
|
||
|
<li>The 8 incoming registers are referred to as <span class="samp">%i</span><var>n</var>.
|
||
|
|
||
|
<li>The frame pointer register <span class="samp">%i6</span> can be referenced using
|
||
|
the alias <span class="samp">%fp</span>.
|
||
|
|
||
|
<li>The stack pointer register <span class="samp">%o6</span> can be referenced using
|
||
|
the alias <span class="samp">%sp</span>.
|
||
|
</ul>
|
||
|
|
||
|
<p>Floating point registers are simply referred to as <span class="samp">%f</span><var>n</var>.
|
||
|
When assembling for pre-V9, only 32 floating point registers
|
||
|
are available. For V9 and later there are 64, but there are
|
||
|
restrictions when referencing the upper 32 registers. They
|
||
|
can only be accessed as double or quad, and thus only even
|
||
|
or quad numbered accesses are allowed. For example, <span class="samp">%f34</span>
|
||
|
is a legal floating point register, but <span class="samp">%f35</span> is not.
|
||
|
|
||
|
<p>Certain V9 instructions allow access to ancillary state registers.
|
||
|
Most simply they can be referred to as <span class="samp">%asr</span><var>n</var> where
|
||
|
<var>n</var> can be from 16 to 31. However, there are some aliases
|
||
|
defined to reference ASR registers defined for various UltraSPARC
|
||
|
processors:
|
||
|
|
||
|
<ul>
|
||
|
<li>The tick compare register is referred to as <span class="samp">%tick_cmpr</span>.
|
||
|
|
||
|
<li>The system tick register is referred to as <span class="samp">%stick</span>. An alias,
|
||
|
<span class="samp">%sys_tick</span>, exists but is deprecated and should not be used
|
||
|
by new software.
|
||
|
|
||
|
<li>The system tick compare register is referred to as <span class="samp">%stick_cmpr</span>.
|
||
|
An alias, <span class="samp">%sys_tick_cmpr</span>, exists but is deprecated and should
|
||
|
not be used by new software.
|
||
|
|
||
|
<li>The software interrupt register is referred to as <span class="samp">%softint</span>.
|
||
|
|
||
|
<li>The set software interrupt register is referred to as <span class="samp">%set_softint</span>.
|
||
|
The mnemonic <span class="samp">%softint_set</span> is provided as an alias.
|
||
|
|
||
|
<li>The clear software interrupt register is referred to as
|
||
|
<span class="samp">%clear_softint</span>. The mnemonic <span class="samp">%softint_clear</span> is provided
|
||
|
as an alias.
|
||
|
|
||
|
<li>The performance instrumentation counters register is referred to as
|
||
|
<span class="samp">%pic</span>.
|
||
|
|
||
|
<li>The performance control register is referred to as <span class="samp">%pcr</span>.
|
||
|
|
||
|
<li>The graphics status register is referred to as <span class="samp">%gsr</span>.
|
||
|
|
||
|
<li>The V9 dispatch control register is referred to as <span class="samp">%dcr</span>.
|
||
|
</ul>
|
||
|
|
||
|
<p>Various V9 branch and conditional move instructions allow
|
||
|
specification of which set of integer condition codes to
|
||
|
test. These are referred to as <span class="samp">%xcc</span> and <span class="samp">%icc</span>.
|
||
|
|
||
|
<p>In V9, there are 4 sets of floating point condition codes
|
||
|
which are referred to as <span class="samp">%fcc</span><var>n</var>.
|
||
|
|
||
|
<p>Several special privileged and non-privileged registers
|
||
|
exist:
|
||
|
|
||
|
<ul>
|
||
|
<li>The V9 address space identifier register is referred to as <span class="samp">%asi</span>.
|
||
|
|
||
|
<li>The V9 restorable windows register is referred to as <span class="samp">%canrestore</span>.
|
||
|
|
||
|
<li>The V9 savable windows register is referred to as <span class="samp">%cansave</span>.
|
||
|
|
||
|
<li>The V9 clean windows register is referred to as <span class="samp">%cleanwin</span>.
|
||
|
|
||
|
<li>The V9 current window pointer register is referred to as <span class="samp">%cwp</span>.
|
||
|
|
||
|
<li>The floating-point queue register is referred to as <span class="samp">%fq</span>.
|
||
|
|
||
|
<li>The V8 co-processor queue register is referred to as <span class="samp">%cq</span>.
|
||
|
|
||
|
<li>The floating point status register is referred to as <span class="samp">%fsr</span>.
|
||
|
|
||
|
<li>The other windows register is referred to as <span class="samp">%otherwin</span>.
|
||
|
|
||
|
<li>The V9 program counter register is referred to as <span class="samp">%pc</span>.
|
||
|
|
||
|
<li>The V9 next program counter register is referred to as <span class="samp">%npc</span>.
|
||
|
|
||
|
<li>The V9 processor interrupt level register is referred to as <span class="samp">%pil</span>.
|
||
|
|
||
|
<li>The V9 processor state register is referred to as <span class="samp">%pstate</span>.
|
||
|
|
||
|
<li>The trap base address register is referred to as <span class="samp">%tba</span>.
|
||
|
|
||
|
<li>The V9 tick register is referred to as <span class="samp">%tick</span>.
|
||
|
|
||
|
<li>The V9 trap level is referred to as <span class="samp">%tl</span>.
|
||
|
|
||
|
<li>The V9 trap program counter is referred to as <span class="samp">%tpc</span>.
|
||
|
|
||
|
<li>The V9 trap next program counter is referred to as <span class="samp">%tnpc</span>.
|
||
|
|
||
|
<li>The V9 trap state is referred to as <span class="samp">%tstate</span>.
|
||
|
|
||
|
<li>The V9 trap type is referred to as <span class="samp">%tt</span>.
|
||
|
|
||
|
<li>The V9 condition codes is referred to as <span class="samp">%ccr</span>.
|
||
|
|
||
|
<li>The V9 floating-point registers state is referred to as <span class="samp">%fprs</span>.
|
||
|
|
||
|
<li>The V9 version register is referred to as <span class="samp">%ver</span>.
|
||
|
|
||
|
<li>The V9 window state register is referred to as <span class="samp">%wstate</span>.
|
||
|
|
||
|
<li>The Y register is referred to as <span class="samp">%y</span>.
|
||
|
|
||
|
<li>The V8 window invalid mask register is referred to as <span class="samp">%wim</span>.
|
||
|
|
||
|
<li>The V8 processor state register is referred to as <span class="samp">%psr</span>.
|
||
|
|
||
|
<li>The V9 global register level register is referred to as <span class="samp">%gl</span>.
|
||
|
</ul>
|
||
|
|
||
|
<p>Several special register names exist for hypervisor mode code:
|
||
|
|
||
|
<ul>
|
||
|
<li>The hyperprivileged processor state register is referred to as
|
||
|
<span class="samp">%hpstate</span>.
|
||
|
|
||
|
<li>The hyperprivileged trap state register is referred to as <span class="samp">%htstate</span>.
|
||
|
|
||
|
<li>The hyperprivileged interrupt pending register is referred to as
|
||
|
<span class="samp">%hintp</span>.
|
||
|
|
||
|
<li>The hyperprivileged trap base address register is referred to as
|
||
|
<span class="samp">%htba</span>.
|
||
|
|
||
|
<li>The hyperprivileged implementation version register is referred
|
||
|
to as <span class="samp">%hver</span>.
|
||
|
|
||
|
<li>The hyperprivileged system tick compare register is referred
|
||
|
to as <span class="samp">%hstick_cmpr</span>. Note that there is no <span class="samp">%hstick</span>
|
||
|
register, the normal <span class="samp">%stick</span> is used.
|
||
|
</ul>
|
||
|
|
||
|
</body></html>
|
||
|
|