sparc64-regs.S revision 1.1.1.5 1 1.1.1.5 christos /* Copyright 2017-2024 Free Software Foundation, Inc.
2 1.1 christos
3 1.1 christos This program is free software; you can redistribute it and/or modify
4 1.1 christos it under the terms of the GNU General Public License as published by
5 1.1 christos the Free Software Foundation; either version 3 of the License, or
6 1.1 christos (at your option) any later version.
7 1.1 christos
8 1.1 christos This program is distributed in the hope that it will be useful,
9 1.1 christos but WITHOUT ANY WARRANTY; without even the implied warranty of
10 1.1 christos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 1.1 christos GNU General Public License for more details.
12 1.1 christos
13 1.1 christos You should have received a copy of the GNU General Public License
14 1.1 christos along with this program. If not, see <http://www.gnu.org/licenses/>.
15 1.1 christos
16 1.1 christos This file is part of the gdb testsuite.
17 1.1 christos KAT for decoding various sparc64 registers. */
18 1.1 christos
19 1.1 christos .section ".text"
20 1.1 christos .align 4
21 1.1 christos
22 1.1 christos .global main
23 1.1 christos .type main, #function
24 1.1 christos main:
25 1.1 christos call test_ccr
26 1.1 christos nop
27 1.1 christos call test_fsr
28 1.1 christos nop
29 1.1 christos retl
30 1.1 christos nop
31 1.1 christos .size main, .-main
32 1.1 christos
33 1.1 christos .type test_ccr, #function
34 1.1 christos test_ccr:
35 1.1 christos .cfi_startproc
36 1.1 christos wr %g0, 0x01, %ccr
37 1.1 christos wr %g0, 0x02, %ccr
38 1.1 christos wr %g0, 0x03, %ccr
39 1.1 christos wr %g0, 0x04, %ccr
40 1.1 christos wr %g0, 0x05, %ccr
41 1.1 christos wr %g0, 0x06, %ccr
42 1.1 christos wr %g0, 0x07, %ccr
43 1.1 christos wr %g0, 0x08, %ccr
44 1.1 christos wr %g0, 0x09, %ccr
45 1.1 christos wr %g0, 0x0a, %ccr
46 1.1 christos wr %g0, 0x0b, %ccr
47 1.1 christos wr %g0, 0x0c, %ccr
48 1.1 christos wr %g0, 0x0d, %ccr
49 1.1 christos wr %g0, 0x0e, %ccr
50 1.1 christos wr %g0, 0x0f, %ccr
51 1.1 christos
52 1.1 christos wr %g0, 0x10, %ccr
53 1.1 christos wr %g0, 0x20, %ccr
54 1.1 christos wr %g0, 0x30, %ccr
55 1.1 christos wr %g0, 0x40, %ccr
56 1.1 christos wr %g0, 0x50, %ccr
57 1.1 christos wr %g0, 0x60, %ccr
58 1.1 christos wr %g0, 0x70, %ccr
59 1.1 christos wr %g0, 0x80, %ccr
60 1.1 christos wr %g0, 0x90, %ccr
61 1.1 christos wr %g0, 0xa0, %ccr
62 1.1 christos wr %g0, 0xb0, %ccr
63 1.1 christos wr %g0, 0xc0, %ccr
64 1.1 christos wr %g0, 0xd0, %ccr
65 1.1 christos wr %g0, 0xe0, %ccr
66 1.1 christos wr %g0, 0xf0, %ccr
67 1.1 christos
68 1.1 christos retl
69 1.1 christos nop
70 1.1 christos .cfi_endproc
71 1.1 christos .size test_ccr, .-test_ccr
72 1.1 christos
73 1.1 christos .type test_fsr, #function
74 1.1 christos test_fsr:
75 1.1 christos .cfi_startproc
76 1.1 christos wr %g0, 4, %fprs
77 1.1 christos setx flags, %l1, %l0
78 1.1 christos mov 1, %l1
79 1.1 christos stx %l1, [%l0]
80 1.1 christos ldx [%l0], %fsr
81 1.1 christos sllx %l1, 1, %l1 ! sparc64-regs.exp: after first %fsr
82 1.1 christos stx %l1, [%l0]
83 1.1 christos ldx [%l0], %fsr
84 1.1 christos sllx %l1, 1, %l1
85 1.1 christos stx %l1, [%l0]
86 1.1 christos ldx [%l0], %fsr
87 1.1 christos sllx %l1, 1, %l1
88 1.1 christos stx %l1, [%l0]
89 1.1 christos ldx [%l0], %fsr
90 1.1 christos sllx %l1, 1, %l1
91 1.1 christos stx %l1, [%l0]
92 1.1 christos ldx [%l0], %fsr
93 1.1 christos sllx %l1, 1, %l1
94 1.1 christos stx %l1, [%l0]
95 1.1 christos ldx [%l0], %fsr
96 1.1 christos sllx %l1, 1, %l1
97 1.1 christos stx %l1, [%l0]
98 1.1 christos ldx [%l0], %fsr
99 1.1 christos sllx %l1, 1, %l1
100 1.1 christos stx %l1, [%l0]
101 1.1 christos ldx [%l0], %fsr
102 1.1 christos sllx %l1, 1, %l1
103 1.1 christos stx %l1, [%l0]
104 1.1 christos ldx [%l0], %fsr
105 1.1 christos sllx %l1, 1, %l1
106 1.1 christos stx %l1, [%l0]
107 1.1 christos ldx [%l0], %fsr
108 1.1 christos sllx %l1, 14, %l1 ! move to fsr.tem fields
109 1.1 christos stx %l1, [%l0]
110 1.1 christos ldx [%l0], %fsr
111 1.1 christos sllx %l1, 1, %l1
112 1.1 christos stx %l1, [%l0]
113 1.1 christos ldx [%l0], %fsr
114 1.1 christos sllx %l1, 1, %l1
115 1.1 christos stx %l1, [%l0]
116 1.1 christos ldx [%l0], %fsr
117 1.1 christos sllx %l1, 1, %l1
118 1.1 christos stx %l1, [%l0]
119 1.1 christos ldx [%l0], %fsr
120 1.1 christos sllx %l1, 1, %l1
121 1.1 christos stx %l1, [%l0]
122 1.1 christos ldx [%l0], %fsr
123 1.1 christos sllx %l1, 1, %l1
124 1.1 christos stx %l1, [%l0]
125 1.1 christos ldx [%l0], %fsr
126 1.1 christos sllx %l1, 1, %l1
127 1.1 christos
128 1.1 christos retl
129 1.1 christos nop
130 1.1 christos .cfi_endproc
131 1.1 christos .size test_fsr, .-test_fsr
132 1.1 christos
133 1.1 christos .section ".data"
134 1.1 christos .align 8
135 1.1 christos flags: .xword 0x0000000000000000
136 1.1 christos .size flags, .-flags
137 1.1.1.4 christos .section .note.GNU-stack,"",@progbits
138