Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / sam / docs / ui-cmds / cmd_read-reg.html
CommitLineData
920dae64
AT
1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3<head>
4<title>SPARC Architectural Model: User Commands</title>
5</head>
6<body bgcolor="#FFFFFF" LANG="en-US">
7<div STYLE="margin-bottom: 0cm"></div>&nbsp;
8
9<h2>
10read-reg
11</h2>
12
13<h4>
14NAME
15</h4>
16<ul>
17read-reg - read a register
18</ul>
19
20<h4>SYNOPSIS</h4>
21<tt>
22<ul>
23read-reg [-cpu <i>cpu_set</i>]
24[-cwp <i>window-pointer</i>] [-gl <i>global-level</i>] [-tl <i>trap-level</i>]
25<i>reg-name</i>
26</ul>
27</tt>
28
29<h4>DESCRIPTION</h4>
30<ul>
31Fetches a cpu register. If <a href="flag_cpu.html">-cpu</a> is
32omitted, the current frontend strand is used.
33Use <a href="cmd_cpuregs.html">cpuregs</a> command to show
34the supported register names.
35<p>
36By default, the current cwp register, global level, and trap level are
37used to access windowed registers, global registers, and trap
38registers, respectively.
39The -cwp, -gl, and -tl flags may be used to override these defaults.
40<table cellpadding=5%>
41<tr>
42<th>Flag</th><th>Behavior</i></th>
43</tr>
44<tr>
45<td valign="top">-cwp <i>window-pointer</i></td><td>Sets the register window used to access
46windowed registers</td>
47</tr>
48<tr>
49<td valign="top">-gl <i>global-level</i></td><td>Sets the global level used to access global
50registers</td>
51</tr>
52<tr>
53<td valign="top">-tl <i>trap-level</i></td><td>Sets the trap level used to access trap
54registers</td>
55</tr>
56</table>
57</ul>
58
59<h4>RETURN VALUES</h4>
60<ul>
61Returns the value of a specific register.
62</ul>
63
64<h4>SEE ALSO</h4>
65<ul><a href="cmd_reg.html">%reg</a></ul>
66<ul><a href="cmd_write-reg.html">write-reg</a></ul>
67<ul><a href="cmd_pregs.html">pregs</a></ul>
68<ul><a href="cmd_cpuregs.html">cpuregs</a></ul>
69
70<hr>
71</body>
72</html>