xref: /illumos-gate/usr/src/cmd/dtrace/test/tst/sparc/arrays/tst.uregsarray.d (revision d48be21240dfd051b689384ce2b23479d757f2d8)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*
28  * ASSERTION:
29  *	Positive test to make sure that we can invoke sparc
30  *	ureg[] aliases.
31  *
32  * SECTION: User Process Tracing/uregs Array
33  *
34  * NOTES: This test does no verification - the value of the output
35  *	is not deterministic.
36  */
37 
38 #pragma D option quiet
39 
40 BEGIN
41 {
42 	printf("R_G0 = 0x%x\n", uregs[R_G0]);
43 	printf("R_G1 = 0x%x\n", uregs[R_G1]);
44 	printf("R_G2 = 0x%x\n", uregs[R_G2]);
45 	printf("R_G3 = 0x%x\n", uregs[R_G3]);
46 	printf("R_G4 = 0x%x\n", uregs[R_G4]);
47 	printf("R_G5 = 0x%x\n", uregs[R_G5]);
48 	printf("R_G6 = 0x%x\n", uregs[R_G6]);
49 	printf("R_G7 = 0x%x\n", uregs[R_G7]);
50 	printf("R_O0 = 0x%x\n", uregs[R_O0]);
51 	printf("R_O1 = 0x%x\n", uregs[R_O1]);
52 	printf("R_O2 = 0x%x\n", uregs[R_O2]);
53 	printf("R_O3 = 0x%x\n", uregs[R_O3]);
54 	printf("R_O4 = 0x%x\n", uregs[R_O4]);
55 	printf("R_O5 = 0x%x\n", uregs[R_O5]);
56 	printf("R_O6 = 0x%x\n", uregs[R_O6]);
57 	printf("R_O7 = 0x%x\n", uregs[R_O7]);
58 	printf("R_L0 = 0x%x\n", uregs[R_L0]);
59 	printf("R_L1 = 0x%x\n", uregs[R_L1]);
60 	printf("R_L2 = 0x%x\n", uregs[R_L2]);
61 	printf("R_L3 = 0x%x\n", uregs[R_L3]);
62 	printf("R_L4 = 0x%x\n", uregs[R_L4]);
63 	printf("R_L5 = 0x%x\n", uregs[R_L5]);
64 	printf("R_L6 = 0x%x\n", uregs[R_L6]);
65 	printf("R_L7 = 0x%x\n", uregs[R_L7]);
66 	printf("R_I0 = 0x%x\n", uregs[R_I0]);
67 	printf("R_I1 = 0x%x\n", uregs[R_I1]);
68 	printf("R_I2 = 0x%x\n", uregs[R_I2]);
69 	printf("R_I3 = 0x%x\n", uregs[R_I3]);
70 	printf("R_I4 = 0x%x\n", uregs[R_I4]);
71 	printf("R_I5 = 0x%x\n", uregs[R_I5]);
72 	printf("R_I6 = 0x%x\n", uregs[R_I6]);
73 	printf("R_I7 = 0x%x\n", uregs[R_I7]);
74 	printf("R_CCR = 0x%x\n", uregs[R_CCR]);
75 	printf("R_PC = 0x%x\n", uregs[R_PC]);
76 	printf("R_NPC = 0x%x\n", uregs[R_NPC]);
77 	printf("R_Y = 0x%x\n", uregs[R_Y]);
78 	printf("R_ASI = 0x%x\n", uregs[R_ASI]);
79 	printf("R_FPRS = 0x%x\n", uregs[R_FPRS]);
80 	exit(0);
81 }
82