annotate src/os_cpu/solaris_sparc/vm/solaris_sparc.il @ 3612:ed3ac862d22d

IdealGraphVisualizer: make Graal graph-to-text converter work again after last commit by copying properties that have the same value in the two input graphs groups to the newly created diff group's properties.
author Peter Hofer <peter.hofer@jku.at>
date Wed, 02 Nov 2011 17:27:31 +0100
parents 85c73c0edb06
children 46c544b8fbfc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 //
2140
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
2 // Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 //
a61af66fc99e Initial load
duke
parents:
diff changeset
5 // This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 // under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 // published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 //
a61af66fc99e Initial load
duke
parents:
diff changeset
9 // This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 // version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 // accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 //
a61af66fc99e Initial load
duke
parents:
diff changeset
15 // You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 // 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 //
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
19 // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
20 // or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
21 // questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 //
a61af66fc99e Initial load
duke
parents:
diff changeset
23 //
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 // Get the raw thread ID from %g7
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 .inline _raw_thread_id, 0
a61af66fc99e Initial load
duke
parents:
diff changeset
28 .register %g7,#scratch
a61af66fc99e Initial load
duke
parents:
diff changeset
29 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
30 mov %g7, %o0
a61af66fc99e Initial load
duke
parents:
diff changeset
31 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
32 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
33
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35 // Clear SPARC fprs.FEF DU and DL bits --
a61af66fc99e Initial load
duke
parents:
diff changeset
36 // allows the kernel to avoid saving FPU state at context-switch time.
a61af66fc99e Initial load
duke
parents:
diff changeset
37 // Use for state-transition points (into _thread_blocked) or when
a61af66fc99e Initial load
duke
parents:
diff changeset
38 // parking.
a61af66fc99e Initial load
duke
parents:
diff changeset
39
a61af66fc99e Initial load
duke
parents:
diff changeset
40 .inline _mark_fpu_nosave, 0
a61af66fc99e Initial load
duke
parents:
diff changeset
41 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
42 wr %g0, 0, %fprs
a61af66fc99e Initial load
duke
parents:
diff changeset
43 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
44 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
45
a61af66fc99e Initial load
duke
parents:
diff changeset
46 // Support for jint Atomic::xchg(jint exchange_value, volatile jint* dest).
a61af66fc99e Initial load
duke
parents:
diff changeset
47 //
a61af66fc99e Initial load
duke
parents:
diff changeset
48 // Arguments:
a61af66fc99e Initial load
duke
parents:
diff changeset
49 // exchange_value: O0
a61af66fc99e Initial load
duke
parents:
diff changeset
50 // dest: O1
a61af66fc99e Initial load
duke
parents:
diff changeset
51 //
a61af66fc99e Initial load
duke
parents:
diff changeset
52 // Results:
a61af66fc99e Initial load
duke
parents:
diff changeset
53 // O0: the value previously stored in dest
a61af66fc99e Initial load
duke
parents:
diff changeset
54
a61af66fc99e Initial load
duke
parents:
diff changeset
55 .inline _Atomic_swap32, 2
a61af66fc99e Initial load
duke
parents:
diff changeset
56 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
57 swap [%o1],%o0
a61af66fc99e Initial load
duke
parents:
diff changeset
58 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
59 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
60
a61af66fc99e Initial load
duke
parents:
diff changeset
61
a61af66fc99e Initial load
duke
parents:
diff changeset
62 // Support for intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t * dest).
a61af66fc99e Initial load
duke
parents:
diff changeset
63 //
a61af66fc99e Initial load
duke
parents:
diff changeset
64 // 64-bit
a61af66fc99e Initial load
duke
parents:
diff changeset
65 //
a61af66fc99e Initial load
duke
parents:
diff changeset
66 // Arguments:
a61af66fc99e Initial load
duke
parents:
diff changeset
67 // exchange_value: O0
a61af66fc99e Initial load
duke
parents:
diff changeset
68 // dest: O1
a61af66fc99e Initial load
duke
parents:
diff changeset
69 //
a61af66fc99e Initial load
duke
parents:
diff changeset
70 // Results:
a61af66fc99e Initial load
duke
parents:
diff changeset
71 // O0: the value previously stored in dest
a61af66fc99e Initial load
duke
parents:
diff changeset
72
a61af66fc99e Initial load
duke
parents:
diff changeset
73 .inline _Atomic_swap64, 2
a61af66fc99e Initial load
duke
parents:
diff changeset
74 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
75 1:
a61af66fc99e Initial load
duke
parents:
diff changeset
76 mov %o0, %o3
a61af66fc99e Initial load
duke
parents:
diff changeset
77 ldx [%o1], %o2
a61af66fc99e Initial load
duke
parents:
diff changeset
78 casx [%o1], %o2, %o3
a61af66fc99e Initial load
duke
parents:
diff changeset
79 cmp %o2, %o3
a61af66fc99e Initial load
duke
parents:
diff changeset
80 bne %xcc, 1b
a61af66fc99e Initial load
duke
parents:
diff changeset
81 nop
a61af66fc99e Initial load
duke
parents:
diff changeset
82 mov %o2, %o0
a61af66fc99e Initial load
duke
parents:
diff changeset
83 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
84 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
85
a61af66fc99e Initial load
duke
parents:
diff changeset
86
a61af66fc99e Initial load
duke
parents:
diff changeset
87 // Support for jint Atomic::cmpxchg(jint exchange_value,
a61af66fc99e Initial load
duke
parents:
diff changeset
88 // volatile jint* dest,
a61af66fc99e Initial load
duke
parents:
diff changeset
89 // jint compare_value)
a61af66fc99e Initial load
duke
parents:
diff changeset
90 //
a61af66fc99e Initial load
duke
parents:
diff changeset
91 // Arguments:
a61af66fc99e Initial load
duke
parents:
diff changeset
92 // exchange_value: O0
a61af66fc99e Initial load
duke
parents:
diff changeset
93 // dest: O1
a61af66fc99e Initial load
duke
parents:
diff changeset
94 // compare_value: O2
a61af66fc99e Initial load
duke
parents:
diff changeset
95 //
a61af66fc99e Initial load
duke
parents:
diff changeset
96 // Results:
a61af66fc99e Initial load
duke
parents:
diff changeset
97 // O0: the value previously stored in dest
a61af66fc99e Initial load
duke
parents:
diff changeset
98
a61af66fc99e Initial load
duke
parents:
diff changeset
99 .inline _Atomic_cas32, 3
a61af66fc99e Initial load
duke
parents:
diff changeset
100 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
101 cas [%o1], %o2, %o0
a61af66fc99e Initial load
duke
parents:
diff changeset
102 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
103 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
104
a61af66fc99e Initial load
duke
parents:
diff changeset
105
a61af66fc99e Initial load
duke
parents:
diff changeset
106 // Support for intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value,
a61af66fc99e Initial load
duke
parents:
diff changeset
107 // volatile intptr_t* dest,
a61af66fc99e Initial load
duke
parents:
diff changeset
108 // intptr_t compare_value)
a61af66fc99e Initial load
duke
parents:
diff changeset
109 //
a61af66fc99e Initial load
duke
parents:
diff changeset
110 // 64-bit
a61af66fc99e Initial load
duke
parents:
diff changeset
111 //
a61af66fc99e Initial load
duke
parents:
diff changeset
112 // Arguments:
a61af66fc99e Initial load
duke
parents:
diff changeset
113 // exchange_value: O0
a61af66fc99e Initial load
duke
parents:
diff changeset
114 // dest: O1
a61af66fc99e Initial load
duke
parents:
diff changeset
115 // compare_value: O2
a61af66fc99e Initial load
duke
parents:
diff changeset
116 //
a61af66fc99e Initial load
duke
parents:
diff changeset
117 // Results:
a61af66fc99e Initial load
duke
parents:
diff changeset
118 // O0: the value previously stored in dest
a61af66fc99e Initial load
duke
parents:
diff changeset
119
a61af66fc99e Initial load
duke
parents:
diff changeset
120 .inline _Atomic_cas64, 3
a61af66fc99e Initial load
duke
parents:
diff changeset
121 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
122 casx [%o1], %o2, %o0
a61af66fc99e Initial load
duke
parents:
diff changeset
123 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
124 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
125
a61af66fc99e Initial load
duke
parents:
diff changeset
126
a61af66fc99e Initial load
duke
parents:
diff changeset
127 // Support for jlong Atomic::cmpxchg(jlong exchange_value,
a61af66fc99e Initial load
duke
parents:
diff changeset
128 // volatile jlong* dest,
a61af66fc99e Initial load
duke
parents:
diff changeset
129 // jlong compare_value)
a61af66fc99e Initial load
duke
parents:
diff changeset
130 //
a61af66fc99e Initial load
duke
parents:
diff changeset
131 // 32-bit calling conventions
a61af66fc99e Initial load
duke
parents:
diff changeset
132 //
a61af66fc99e Initial load
duke
parents:
diff changeset
133 // Arguments:
a61af66fc99e Initial load
duke
parents:
diff changeset
134 // exchange_value: O1:O0
a61af66fc99e Initial load
duke
parents:
diff changeset
135 // dest: O2
a61af66fc99e Initial load
duke
parents:
diff changeset
136 // compare_value: O4:O3
a61af66fc99e Initial load
duke
parents:
diff changeset
137 //
a61af66fc99e Initial load
duke
parents:
diff changeset
138 // Results:
a61af66fc99e Initial load
duke
parents:
diff changeset
139 // O1:O0: the value previously stored in dest
a61af66fc99e Initial load
duke
parents:
diff changeset
140
a61af66fc99e Initial load
duke
parents:
diff changeset
141 .inline _Atomic_casl, 3
a61af66fc99e Initial load
duke
parents:
diff changeset
142 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
143 sllx %o0, 32, %o0
a61af66fc99e Initial load
duke
parents:
diff changeset
144 srl %o1, 0, %o1
a61af66fc99e Initial load
duke
parents:
diff changeset
145 or %o0,%o1,%o0
a61af66fc99e Initial load
duke
parents:
diff changeset
146 sllx %o3, 32, %o3
a61af66fc99e Initial load
duke
parents:
diff changeset
147 srl %o4, 0, %o4
a61af66fc99e Initial load
duke
parents:
diff changeset
148 or %o3,%o4,%o3
a61af66fc99e Initial load
duke
parents:
diff changeset
149 casx [%o2], %o3, %o0
a61af66fc99e Initial load
duke
parents:
diff changeset
150 srl %o0, 0, %o1
a61af66fc99e Initial load
duke
parents:
diff changeset
151 srlx %o0, 32, %o0
a61af66fc99e Initial load
duke
parents:
diff changeset
152 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
153 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
154
2140
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
155 // Support for jlong Atomic::load and Atomic::store on v8.
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
156 //
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
157 // void _Atomic_move_long_v8(volatile jlong* src, volatile jlong* dst)
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
158 //
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
159 // Arguments:
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
160 // src: O0
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
161 // dest: O1
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
162 //
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
163 // Overwrites O2 and O3
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
164
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
165 .inline _Atomic_move_long_v8,2
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
166 .volatile
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
167 ldd [%o0], %o2
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
168 std %o2, [%o1]
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
169 .nonvolatile
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
170 .end
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
171
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
172 // Support for jlong Atomic::load and Atomic::store on v9.
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
173 //
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
174 // void _Atomic_move_long_v9(volatile jlong* src, volatile jlong* dst)
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
175 //
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
176 // Arguments:
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
177 // src: O0
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
178 // dest: O1
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
179 //
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
180 // Overwrites O2
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
181
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
182 .inline _Atomic_move_long_v9,2
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
183 .volatile
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
184 ldx [%o0], %o2
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
185 stx %o2, [%o1]
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
186 .nonvolatile
85c73c0edb06 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
187 .end
0
a61af66fc99e Initial load
duke
parents:
diff changeset
188
a61af66fc99e Initial load
duke
parents:
diff changeset
189 // Support for jint Atomic::add(jint add_value, volatile jint* dest).
a61af66fc99e Initial load
duke
parents:
diff changeset
190 //
a61af66fc99e Initial load
duke
parents:
diff changeset
191 // Arguments:
a61af66fc99e Initial load
duke
parents:
diff changeset
192 // add_value: O0 (e.g., +1 or -1)
a61af66fc99e Initial load
duke
parents:
diff changeset
193 // dest: O1
a61af66fc99e Initial load
duke
parents:
diff changeset
194 //
a61af66fc99e Initial load
duke
parents:
diff changeset
195 // Results:
a61af66fc99e Initial load
duke
parents:
diff changeset
196 // O0: the new value stored in dest
a61af66fc99e Initial load
duke
parents:
diff changeset
197 //
a61af66fc99e Initial load
duke
parents:
diff changeset
198 // Overwrites O3
a61af66fc99e Initial load
duke
parents:
diff changeset
199
a61af66fc99e Initial load
duke
parents:
diff changeset
200 .inline _Atomic_add32, 2
a61af66fc99e Initial load
duke
parents:
diff changeset
201 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
202 2:
a61af66fc99e Initial load
duke
parents:
diff changeset
203 ld [%o1], %o2
a61af66fc99e Initial load
duke
parents:
diff changeset
204 add %o0, %o2, %o3
a61af66fc99e Initial load
duke
parents:
diff changeset
205 cas [%o1], %o2, %o3
a61af66fc99e Initial load
duke
parents:
diff changeset
206 cmp %o2, %o3
a61af66fc99e Initial load
duke
parents:
diff changeset
207 bne 2b
a61af66fc99e Initial load
duke
parents:
diff changeset
208 nop
a61af66fc99e Initial load
duke
parents:
diff changeset
209 add %o0, %o2, %o0
a61af66fc99e Initial load
duke
parents:
diff changeset
210 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
211 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
212
a61af66fc99e Initial load
duke
parents:
diff changeset
213
a61af66fc99e Initial load
duke
parents:
diff changeset
214 // Support for intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest)
a61af66fc99e Initial load
duke
parents:
diff changeset
215 //
a61af66fc99e Initial load
duke
parents:
diff changeset
216 // 64-bit
a61af66fc99e Initial load
duke
parents:
diff changeset
217 //
a61af66fc99e Initial load
duke
parents:
diff changeset
218 // Arguments:
a61af66fc99e Initial load
duke
parents:
diff changeset
219 // add_value: O0 (e.g., +1 or -1)
a61af66fc99e Initial load
duke
parents:
diff changeset
220 // dest: O1
a61af66fc99e Initial load
duke
parents:
diff changeset
221 //
a61af66fc99e Initial load
duke
parents:
diff changeset
222 // Results:
a61af66fc99e Initial load
duke
parents:
diff changeset
223 // O0: the new value stored in dest
a61af66fc99e Initial load
duke
parents:
diff changeset
224 //
a61af66fc99e Initial load
duke
parents:
diff changeset
225 // Overwrites O3
a61af66fc99e Initial load
duke
parents:
diff changeset
226
a61af66fc99e Initial load
duke
parents:
diff changeset
227 .inline _Atomic_add64, 2
a61af66fc99e Initial load
duke
parents:
diff changeset
228 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
229 3:
a61af66fc99e Initial load
duke
parents:
diff changeset
230 ldx [%o1], %o2
a61af66fc99e Initial load
duke
parents:
diff changeset
231 add %o0, %o2, %o3
a61af66fc99e Initial load
duke
parents:
diff changeset
232 casx [%o1], %o2, %o3
a61af66fc99e Initial load
duke
parents:
diff changeset
233 cmp %o2, %o3
a61af66fc99e Initial load
duke
parents:
diff changeset
234 bne %xcc, 3b
a61af66fc99e Initial load
duke
parents:
diff changeset
235 nop
a61af66fc99e Initial load
duke
parents:
diff changeset
236 add %o0, %o2, %o0
a61af66fc99e Initial load
duke
parents:
diff changeset
237 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
238 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
239
a61af66fc99e Initial load
duke
parents:
diff changeset
240
a61af66fc99e Initial load
duke
parents:
diff changeset
241 // Support for void OrderAccess::acquire()
a61af66fc99e Initial load
duke
parents:
diff changeset
242 // The method is intentionally empty.
a61af66fc99e Initial load
duke
parents:
diff changeset
243 // It exists for the sole purpose of generating
a61af66fc99e Initial load
duke
parents:
diff changeset
244 // a C/C++ sequence point over which the compiler won't
a61af66fc99e Initial load
duke
parents:
diff changeset
245 // reorder code.
a61af66fc99e Initial load
duke
parents:
diff changeset
246
a61af66fc99e Initial load
duke
parents:
diff changeset
247 .inline _OrderAccess_acquire,0
a61af66fc99e Initial load
duke
parents:
diff changeset
248 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
249 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
250 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
251
a61af66fc99e Initial load
duke
parents:
diff changeset
252
a61af66fc99e Initial load
duke
parents:
diff changeset
253 // Support for void OrderAccess::fence()
a61af66fc99e Initial load
duke
parents:
diff changeset
254
a61af66fc99e Initial load
duke
parents:
diff changeset
255 .inline _OrderAccess_fence,0
a61af66fc99e Initial load
duke
parents:
diff changeset
256 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
257 membar #StoreLoad
a61af66fc99e Initial load
duke
parents:
diff changeset
258 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
259 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
260
a61af66fc99e Initial load
duke
parents:
diff changeset
261
a61af66fc99e Initial load
duke
parents:
diff changeset
262 // Support for void Prefetch::read(void *loc, intx interval)
a61af66fc99e Initial load
duke
parents:
diff changeset
263 //
a61af66fc99e Initial load
duke
parents:
diff changeset
264 // Prefetch for several reads.
a61af66fc99e Initial load
duke
parents:
diff changeset
265
a61af66fc99e Initial load
duke
parents:
diff changeset
266 .inline _Prefetch_read, 2
a61af66fc99e Initial load
duke
parents:
diff changeset
267 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
268 prefetch [%o0+%o1], 0
a61af66fc99e Initial load
duke
parents:
diff changeset
269 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
270 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
271
a61af66fc99e Initial load
duke
parents:
diff changeset
272
a61af66fc99e Initial load
duke
parents:
diff changeset
273 // Support for void Prefetch::write(void *loc, intx interval)
a61af66fc99e Initial load
duke
parents:
diff changeset
274 //
a61af66fc99e Initial load
duke
parents:
diff changeset
275 // Prefetch for several writes.
a61af66fc99e Initial load
duke
parents:
diff changeset
276
a61af66fc99e Initial load
duke
parents:
diff changeset
277 .inline _Prefetch_write, 2
a61af66fc99e Initial load
duke
parents:
diff changeset
278 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
279 prefetch [%o0+%o1], 2
a61af66fc99e Initial load
duke
parents:
diff changeset
280 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
281 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
282
a61af66fc99e Initial load
duke
parents:
diff changeset
283
a61af66fc99e Initial load
duke
parents:
diff changeset
284 // Support for void Copy::conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count)
a61af66fc99e Initial load
duke
parents:
diff changeset
285 //
a61af66fc99e Initial load
duke
parents:
diff changeset
286 // 32-bit
a61af66fc99e Initial load
duke
parents:
diff changeset
287 //
a61af66fc99e Initial load
duke
parents:
diff changeset
288 // Arguments:
a61af66fc99e Initial load
duke
parents:
diff changeset
289 // from: O0
a61af66fc99e Initial load
duke
parents:
diff changeset
290 // to: O1
a61af66fc99e Initial load
duke
parents:
diff changeset
291 // count: O2 treated as signed
a61af66fc99e Initial load
duke
parents:
diff changeset
292 //
a61af66fc99e Initial load
duke
parents:
diff changeset
293 // Clobbers:
a61af66fc99e Initial load
duke
parents:
diff changeset
294 // long_value: O2, O3
a61af66fc99e Initial load
duke
parents:
diff changeset
295 // count: O4
a61af66fc99e Initial load
duke
parents:
diff changeset
296 //
a61af66fc99e Initial load
duke
parents:
diff changeset
297 // if (from > to) {
a61af66fc99e Initial load
duke
parents:
diff changeset
298 // while (--count >= 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
299 // *to++ = *from++;
a61af66fc99e Initial load
duke
parents:
diff changeset
300 // }
a61af66fc99e Initial load
duke
parents:
diff changeset
301 // } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
302 // while (--count >= 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
303 // to[count] = from[count];
a61af66fc99e Initial load
duke
parents:
diff changeset
304 // }
a61af66fc99e Initial load
duke
parents:
diff changeset
305 // }
a61af66fc99e Initial load
duke
parents:
diff changeset
306 .inline _Copy_conjoint_jlongs_atomic, 3
a61af66fc99e Initial load
duke
parents:
diff changeset
307 .volatile
a61af66fc99e Initial load
duke
parents:
diff changeset
308 cmp %o0, %o1
a61af66fc99e Initial load
duke
parents:
diff changeset
309 bleu 4f
a61af66fc99e Initial load
duke
parents:
diff changeset
310 sll %o2, 3, %o4
a61af66fc99e Initial load
duke
parents:
diff changeset
311 ba 2f
a61af66fc99e Initial load
duke
parents:
diff changeset
312 1:
a61af66fc99e Initial load
duke
parents:
diff changeset
313 subcc %o4, 8, %o4
a61af66fc99e Initial load
duke
parents:
diff changeset
314 std %o2, [%o1]
a61af66fc99e Initial load
duke
parents:
diff changeset
315 add %o0, 8, %o0
a61af66fc99e Initial load
duke
parents:
diff changeset
316 add %o1, 8, %o1
a61af66fc99e Initial load
duke
parents:
diff changeset
317 2:
a61af66fc99e Initial load
duke
parents:
diff changeset
318 bge,a 1b
a61af66fc99e Initial load
duke
parents:
diff changeset
319 ldd [%o0], %o2
a61af66fc99e Initial load
duke
parents:
diff changeset
320 ba 5f
a61af66fc99e Initial load
duke
parents:
diff changeset
321 nop
a61af66fc99e Initial load
duke
parents:
diff changeset
322 3:
a61af66fc99e Initial load
duke
parents:
diff changeset
323 std %o2, [%o1+%o4]
a61af66fc99e Initial load
duke
parents:
diff changeset
324 4:
a61af66fc99e Initial load
duke
parents:
diff changeset
325 subcc %o4, 8, %o4
a61af66fc99e Initial load
duke
parents:
diff changeset
326 bge,a 3b
a61af66fc99e Initial load
duke
parents:
diff changeset
327 ldd [%o0+%o4], %o2
a61af66fc99e Initial load
duke
parents:
diff changeset
328 5:
a61af66fc99e Initial load
duke
parents:
diff changeset
329 .nonvolatile
a61af66fc99e Initial load
duke
parents:
diff changeset
330 .end