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.
217 lines
11 KiB
HTML
217 lines
11 KiB
HTML
4 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.13">
|
||
|
<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-2015 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.3
|
||
|
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''.
|
||
|
|
||
|
-->
|
||
|
<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; }
|
||
|
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="node">
|
||
|
<a name="Sparc-Regs"></a>
|
||
|
<a name="Sparc_002dRegs"></a>
|
||
|
<p>
|
||
|
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>
|
||
|
</div>
|
||
|
|
||
|
<h5 class="subsubsection">9.42.3.2 Register Names</h5>
|
||
|
|
||
|
<p><a name="index-Sparc-registers-2022"></a><a name="index-register-names_002c-Sparc-2023"></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 ‘<samp><span class="samp">%g</span><var>n</var></samp>’.
|
||
|
|
||
|
<li>The 8 outgoing registers are referred to as ‘<samp><span class="samp">%o</span><var>n</var></samp>’.
|
||
|
|
||
|
<li>The 8 local registers are referred to as ‘<samp><span class="samp">%l</span><var>n</var></samp>’.
|
||
|
|
||
|
<li>The 8 incoming registers are referred to as ‘<samp><span class="samp">%i</span><var>n</var></samp>’.
|
||
|
|
||
|
<li>The frame pointer register ‘<samp><span class="samp">%i6</span></samp>’ can be referenced using
|
||
|
the alias ‘<samp><span class="samp">%fp</span></samp>’.
|
||
|
|
||
|
<li>The stack pointer register ‘<samp><span class="samp">%o6</span></samp>’ can be referenced using
|
||
|
the alias ‘<samp><span class="samp">%sp</span></samp>’.
|
||
|
</ul>
|
||
|
|
||
|
<p>Floating point registers are simply referred to as ‘<samp><span class="samp">%f</span><var>n</var></samp>’.
|
||
|
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, ‘<samp><span class="samp">%f34</span></samp>’
|
||
|
is a legal floating point register, but ‘<samp><span class="samp">%f35</span></samp>’ is not.
|
||
|
|
||
|
<p>Certain V9 instructions allow access to ancillary state registers.
|
||
|
Most simply they can be referred to as ‘<samp><span class="samp">%asr</span><var>n</var></samp>’ 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 ‘<samp><span class="samp">%tick_cmpr</span></samp>’.
|
||
|
|
||
|
<li>The system tick register is referred to as ‘<samp><span class="samp">%stick</span></samp>’. An alias,
|
||
|
‘<samp><span class="samp">%sys_tick</span></samp>’, exists but is deprecated and should not be used
|
||
|
by new software.
|
||
|
|
||
|
<li>The system tick compare register is referred to as ‘<samp><span class="samp">%stick_cmpr</span></samp>’.
|
||
|
An alias, ‘<samp><span class="samp">%sys_tick_cmpr</span></samp>’, exists but is deprecated and should
|
||
|
not be used by new software.
|
||
|
|
||
|
<li>The software interrupt register is referred to as ‘<samp><span class="samp">%softint</span></samp>’.
|
||
|
|
||
|
<li>The set software interrupt register is referred to as ‘<samp><span class="samp">%set_softint</span></samp>’.
|
||
|
The mnemonic ‘<samp><span class="samp">%softint_set</span></samp>’ is provided as an alias.
|
||
|
|
||
|
<li>The clear software interrupt register is referred to as
|
||
|
‘<samp><span class="samp">%clear_softint</span></samp>’. The mnemonic ‘<samp><span class="samp">%softint_clear</span></samp>’ is provided
|
||
|
as an alias.
|
||
|
|
||
|
<li>The performance instrumentation counters register is referred to as
|
||
|
‘<samp><span class="samp">%pic</span></samp>’.
|
||
|
|
||
|
<li>The performance control register is referred to as ‘<samp><span class="samp">%pcr</span></samp>’.
|
||
|
|
||
|
<li>The graphics status register is referred to as ‘<samp><span class="samp">%gsr</span></samp>’.
|
||
|
|
||
|
<li>The V9 dispatch control register is referred to as ‘<samp><span class="samp">%dcr</span></samp>’.
|
||
|
</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 ‘<samp><span class="samp">%xcc</span></samp>’ and ‘<samp><span class="samp">%icc</span></samp>’.
|
||
|
|
||
|
<p>Additionally, GAS supports the so-called “natural” condition codes;
|
||
|
these are referred to as ‘<samp><span class="samp">%ncc</span></samp>’ and reference to ‘<samp><span class="samp">%icc</span></samp>’ if
|
||
|
the word size is 32, ‘<samp><span class="samp">%xcc</span></samp>’ if the word size is 64.
|
||
|
|
||
|
<p>In V9, there are 4 sets of floating point condition codes
|
||
|
which are referred to as ‘<samp><span class="samp">%fcc</span><var>n</var></samp>’.
|
||
|
|
||
|
<p>Several special privileged and non-privileged registers
|
||
|
exist:
|
||
|
|
||
|
<ul>
|
||
|
<li>The V9 address space identifier register is referred to as ‘<samp><span class="samp">%asi</span></samp>’.
|
||
|
|
||
|
<li>The V9 restorable windows register is referred to as ‘<samp><span class="samp">%canrestore</span></samp>’.
|
||
|
|
||
|
<li>The V9 savable windows register is referred to as ‘<samp><span class="samp">%cansave</span></samp>’.
|
||
|
|
||
|
<li>The V9 clean windows register is referred to as ‘<samp><span class="samp">%cleanwin</span></samp>’.
|
||
|
|
||
|
<li>The V9 current window pointer register is referred to as ‘<samp><span class="samp">%cwp</span></samp>’.
|
||
|
|
||
|
<li>The floating-point queue register is referred to as ‘<samp><span class="samp">%fq</span></samp>’.
|
||
|
|
||
|
<li>The V8 co-processor queue register is referred to as ‘<samp><span class="samp">%cq</span></samp>’.
|
||
|
|
||
|
<li>The floating point status register is referred to as ‘<samp><span class="samp">%fsr</span></samp>’.
|
||
|
|
||
|
<li>The other windows register is referred to as ‘<samp><span class="samp">%otherwin</span></samp>’.
|
||
|
|
||
|
<li>The V9 program counter register is referred to as ‘<samp><span class="samp">%pc</span></samp>’.
|
||
|
|
||
|
<li>The V9 next program counter register is referred to as ‘<samp><span class="samp">%npc</span></samp>’.
|
||
|
|
||
|
<li>The V9 processor interrupt level register is referred to as ‘<samp><span class="samp">%pil</span></samp>’.
|
||
|
|
||
|
<li>The V9 processor state register is referred to as ‘<samp><span class="samp">%pstate</span></samp>’.
|
||
|
|
||
|
<li>The trap base address register is referred to as ‘<samp><span class="samp">%tba</span></samp>’.
|
||
|
|
||
|
<li>The V9 tick register is referred to as ‘<samp><span class="samp">%tick</span></samp>’.
|
||
|
|
||
|
<li>The V9 trap level is referred to as ‘<samp><span class="samp">%tl</span></samp>’.
|
||
|
|
||
|
<li>The V9 trap program counter is referred to as ‘<samp><span class="samp">%tpc</span></samp>’.
|
||
|
|
||
|
<li>The V9 trap next program counter is referred to as ‘<samp><span class="samp">%tnpc</span></samp>’.
|
||
|
|
||
|
<li>The V9 trap state is referred to as ‘<samp><span class="samp">%tstate</span></samp>’.
|
||
|
|
||
|
<li>The V9 trap type is referred to as ‘<samp><span class="samp">%tt</span></samp>’.
|
||
|
|
||
|
<li>The V9 condition codes is referred to as ‘<samp><span class="samp">%ccr</span></samp>’.
|
||
|
|
||
|
<li>The V9 floating-point registers state is referred to as ‘<samp><span class="samp">%fprs</span></samp>’.
|
||
|
|
||
|
<li>The V9 version register is referred to as ‘<samp><span class="samp">%ver</span></samp>’.
|
||
|
|
||
|
<li>The V9 window state register is referred to as ‘<samp><span class="samp">%wstate</span></samp>’.
|
||
|
|
||
|
<li>The Y register is referred to as ‘<samp><span class="samp">%y</span></samp>’.
|
||
|
|
||
|
<li>The V8 window invalid mask register is referred to as ‘<samp><span class="samp">%wim</span></samp>’.
|
||
|
|
||
|
<li>The V8 processor state register is referred to as ‘<samp><span class="samp">%psr</span></samp>’.
|
||
|
|
||
|
<li>The V9 global register level register is referred to as ‘<samp><span class="samp">%gl</span></samp>’.
|
||
|
</ul>
|
||
|
|
||
|
<p>Several special register names exist for hypervisor mode code:
|
||
|
|
||
|
<ul>
|
||
|
<li>The hyperprivileged processor state register is referred to as
|
||
|
‘<samp><span class="samp">%hpstate</span></samp>’.
|
||
|
|
||
|
<li>The hyperprivileged trap state register is referred to as ‘<samp><span class="samp">%htstate</span></samp>’.
|
||
|
|
||
|
<li>The hyperprivileged interrupt pending register is referred to as
|
||
|
‘<samp><span class="samp">%hintp</span></samp>’.
|
||
|
|
||
|
<li>The hyperprivileged trap base address register is referred to as
|
||
|
‘<samp><span class="samp">%htba</span></samp>’.
|
||
|
|
||
|
<li>The hyperprivileged implementation version register is referred
|
||
|
to as ‘<samp><span class="samp">%hver</span></samp>’.
|
||
|
|
||
|
<li>The hyperprivileged system tick offset register is referred to as
|
||
|
‘<samp><span class="samp">%hstick_offset</span></samp>’. Note that there is no ‘<samp><span class="samp">%hstick</span></samp>’ register,
|
||
|
the normal ‘<samp><span class="samp">%stick</span></samp>’ is used.
|
||
|
|
||
|
<li>The hyperprivileged system tick enable register is referred to as
|
||
|
‘<samp><span class="samp">%hstick_enable</span></samp>’.
|
||
|
|
||
|
<li>The hyperprivileged system tick compare register is referred
|
||
|
to as ‘<samp><span class="samp">%hstick_cmpr</span></samp>’.
|
||
|
</ul>
|
||
|
|
||
|
</body></html>
|
||
|
|