annotate src/cpu/sparc/vm/jniFastGetField_sparc.cpp @ 9790:6b515c453646

CompilationTask: print exception of compilation also when we don't exit the VM for example, this is useful for CTW, in order to see on which methods the compiler bails out
author Bernhard Urban <bernhard.urban@jku.at>
date Wed, 22 May 2013 16:28:12 +0200
parents f0c2369fda5a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
1748
3e8fbc61cee8 6978355: renaming for 6961697
twisti
parents: 1552
diff changeset
2 * Copyright (c) 2004, 2010, 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: 727
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 727
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: 727
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
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1748
diff changeset
25 #include "precompiled.hpp"
7204
f0c2369fda5a 8003250: SPARC: move MacroAssembler into separate file
twisti
parents: 1972
diff changeset
26 #include "asm/macroAssembler.inline.hpp"
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1748
diff changeset
27 #include "memory/resourceArea.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1748
diff changeset
28 #include "prims/jniFastGetField.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1748
diff changeset
29 #include "prims/jvm_misc.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1748
diff changeset
30 #include "runtime/safepoint.hpp"
0
a61af66fc99e Initial load
duke
parents:
diff changeset
31
a61af66fc99e Initial load
duke
parents:
diff changeset
32 // TSO ensures that loads are blocking and ordered with respect to
a61af66fc99e Initial load
duke
parents:
diff changeset
33 // to earlier loads, so we don't need LoadLoad membars.
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35 #define __ masm->
a61af66fc99e Initial load
duke
parents:
diff changeset
36
a61af66fc99e Initial load
duke
parents:
diff changeset
37 #define BUFFER_SIZE 30*sizeof(jint)
a61af66fc99e Initial load
duke
parents:
diff changeset
38
a61af66fc99e Initial load
duke
parents:
diff changeset
39 // Common register usage:
a61af66fc99e Initial load
duke
parents:
diff changeset
40 // O0: env
a61af66fc99e Initial load
duke
parents:
diff changeset
41 // O1: obj
a61af66fc99e Initial load
duke
parents:
diff changeset
42 // O2: jfieldID
a61af66fc99e Initial load
duke
parents:
diff changeset
43 // O4: offset (O2 >> 2)
a61af66fc99e Initial load
duke
parents:
diff changeset
44 // G4: old safepoint counter
a61af66fc99e Initial load
duke
parents:
diff changeset
45
a61af66fc99e Initial load
duke
parents:
diff changeset
46 address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
a61af66fc99e Initial load
duke
parents:
diff changeset
47 const char *name;
a61af66fc99e Initial load
duke
parents:
diff changeset
48 switch (type) {
a61af66fc99e Initial load
duke
parents:
diff changeset
49 case T_BOOLEAN: name = "jni_fast_GetBooleanField"; break;
a61af66fc99e Initial load
duke
parents:
diff changeset
50 case T_BYTE: name = "jni_fast_GetByteField"; break;
a61af66fc99e Initial load
duke
parents:
diff changeset
51 case T_CHAR: name = "jni_fast_GetCharField"; break;
a61af66fc99e Initial load
duke
parents:
diff changeset
52 case T_SHORT: name = "jni_fast_GetShortField"; break;
a61af66fc99e Initial load
duke
parents:
diff changeset
53 case T_INT: name = "jni_fast_GetIntField"; break;
a61af66fc99e Initial load
duke
parents:
diff changeset
54 default: ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
55 }
a61af66fc99e Initial load
duke
parents:
diff changeset
56 ResourceMark rm;
1748
3e8fbc61cee8 6978355: renaming for 6961697
twisti
parents: 1552
diff changeset
57 BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
3e8fbc61cee8 6978355: renaming for 6961697
twisti
parents: 1552
diff changeset
58 CodeBuffer cbuf(blob);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
59 MacroAssembler* masm = new MacroAssembler(&cbuf);
1748
3e8fbc61cee8 6978355: renaming for 6961697
twisti
parents: 1552
diff changeset
60 address fast_entry = __ pc();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
61
a61af66fc99e Initial load
duke
parents:
diff changeset
62 Label label1, label2;
a61af66fc99e Initial load
duke
parents:
diff changeset
63
727
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
64 AddressLiteral cnt_addrlit(SafepointSynchronize::safepoint_counter_addr());
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
65 __ sethi (cnt_addrlit, O3);
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
66 Address cnt_addr(O3, cnt_addrlit.low10());
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
67 __ ld (cnt_addr, G4);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
68 __ andcc (G4, 1, G0);
a61af66fc99e Initial load
duke
parents:
diff changeset
69 __ br (Assembler::notZero, false, Assembler::pn, label1);
a61af66fc99e Initial load
duke
parents:
diff changeset
70 __ delayed()->srl (O2, 2, O4);
a61af66fc99e Initial load
duke
parents:
diff changeset
71 __ ld_ptr (O1, 0, O5);
a61af66fc99e Initial load
duke
parents:
diff changeset
72
a61af66fc99e Initial load
duke
parents:
diff changeset
73 assert(count < LIST_CAPACITY, "LIST_CAPACITY too small");
a61af66fc99e Initial load
duke
parents:
diff changeset
74 speculative_load_pclist[count] = __ pc();
a61af66fc99e Initial load
duke
parents:
diff changeset
75 switch (type) {
a61af66fc99e Initial load
duke
parents:
diff changeset
76 case T_BOOLEAN: __ ldub (O5, O4, G3); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
77 case T_BYTE: __ ldsb (O5, O4, G3); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
78 case T_CHAR: __ lduh (O5, O4, G3); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
79 case T_SHORT: __ ldsh (O5, O4, G3); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
80 case T_INT: __ ld (O5, O4, G3); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
81 default: ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
82 }
a61af66fc99e Initial load
duke
parents:
diff changeset
83
727
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
84 __ ld (cnt_addr, O5);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
85 __ cmp (O5, G4);
a61af66fc99e Initial load
duke
parents:
diff changeset
86 __ br (Assembler::notEqual, false, Assembler::pn, label2);
a61af66fc99e Initial load
duke
parents:
diff changeset
87 __ delayed()->mov (O7, G1);
a61af66fc99e Initial load
duke
parents:
diff changeset
88 __ retl ();
a61af66fc99e Initial load
duke
parents:
diff changeset
89 __ delayed()->mov (G3, O0);
a61af66fc99e Initial load
duke
parents:
diff changeset
90
a61af66fc99e Initial load
duke
parents:
diff changeset
91 slowcase_entry_pclist[count++] = __ pc();
a61af66fc99e Initial load
duke
parents:
diff changeset
92 __ bind (label1);
a61af66fc99e Initial load
duke
parents:
diff changeset
93 __ mov (O7, G1);
a61af66fc99e Initial load
duke
parents:
diff changeset
94
a61af66fc99e Initial load
duke
parents:
diff changeset
95 address slow_case_addr;
a61af66fc99e Initial load
duke
parents:
diff changeset
96 switch (type) {
a61af66fc99e Initial load
duke
parents:
diff changeset
97 case T_BOOLEAN: slow_case_addr = jni_GetBooleanField_addr(); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
98 case T_BYTE: slow_case_addr = jni_GetByteField_addr(); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
99 case T_CHAR: slow_case_addr = jni_GetCharField_addr(); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
100 case T_SHORT: slow_case_addr = jni_GetShortField_addr(); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
101 case T_INT: slow_case_addr = jni_GetIntField_addr(); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
102 default: ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
103 }
a61af66fc99e Initial load
duke
parents:
diff changeset
104 __ bind (label2);
a61af66fc99e Initial load
duke
parents:
diff changeset
105 __ call (slow_case_addr, relocInfo::none);
a61af66fc99e Initial load
duke
parents:
diff changeset
106 __ delayed()->mov (G1, O7);
a61af66fc99e Initial load
duke
parents:
diff changeset
107
a61af66fc99e Initial load
duke
parents:
diff changeset
108 __ flush ();
a61af66fc99e Initial load
duke
parents:
diff changeset
109
a61af66fc99e Initial load
duke
parents:
diff changeset
110 return fast_entry;
a61af66fc99e Initial load
duke
parents:
diff changeset
111 }
a61af66fc99e Initial load
duke
parents:
diff changeset
112
a61af66fc99e Initial load
duke
parents:
diff changeset
113 address JNI_FastGetField::generate_fast_get_boolean_field() {
a61af66fc99e Initial load
duke
parents:
diff changeset
114 return generate_fast_get_int_field0(T_BOOLEAN);
a61af66fc99e Initial load
duke
parents:
diff changeset
115 }
a61af66fc99e Initial load
duke
parents:
diff changeset
116
a61af66fc99e Initial load
duke
parents:
diff changeset
117 address JNI_FastGetField::generate_fast_get_byte_field() {
a61af66fc99e Initial load
duke
parents:
diff changeset
118 return generate_fast_get_int_field0(T_BYTE);
a61af66fc99e Initial load
duke
parents:
diff changeset
119 }
a61af66fc99e Initial load
duke
parents:
diff changeset
120
a61af66fc99e Initial load
duke
parents:
diff changeset
121 address JNI_FastGetField::generate_fast_get_char_field() {
a61af66fc99e Initial load
duke
parents:
diff changeset
122 return generate_fast_get_int_field0(T_CHAR);
a61af66fc99e Initial load
duke
parents:
diff changeset
123 }
a61af66fc99e Initial load
duke
parents:
diff changeset
124
a61af66fc99e Initial load
duke
parents:
diff changeset
125 address JNI_FastGetField::generate_fast_get_short_field() {
a61af66fc99e Initial load
duke
parents:
diff changeset
126 return generate_fast_get_int_field0(T_SHORT);
a61af66fc99e Initial load
duke
parents:
diff changeset
127 }
a61af66fc99e Initial load
duke
parents:
diff changeset
128
a61af66fc99e Initial load
duke
parents:
diff changeset
129 address JNI_FastGetField::generate_fast_get_int_field() {
a61af66fc99e Initial load
duke
parents:
diff changeset
130 return generate_fast_get_int_field0(T_INT);
a61af66fc99e Initial load
duke
parents:
diff changeset
131 }
a61af66fc99e Initial load
duke
parents:
diff changeset
132
a61af66fc99e Initial load
duke
parents:
diff changeset
133 address JNI_FastGetField::generate_fast_get_long_field() {
a61af66fc99e Initial load
duke
parents:
diff changeset
134 const char *name = "jni_fast_GetLongField";
a61af66fc99e Initial load
duke
parents:
diff changeset
135 ResourceMark rm;
1748
3e8fbc61cee8 6978355: renaming for 6961697
twisti
parents: 1552
diff changeset
136 BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
3e8fbc61cee8 6978355: renaming for 6961697
twisti
parents: 1552
diff changeset
137 CodeBuffer cbuf(blob);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
138 MacroAssembler* masm = new MacroAssembler(&cbuf);
1748
3e8fbc61cee8 6978355: renaming for 6961697
twisti
parents: 1552
diff changeset
139 address fast_entry = __ pc();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
140
a61af66fc99e Initial load
duke
parents:
diff changeset
141 Label label1, label2;
a61af66fc99e Initial load
duke
parents:
diff changeset
142
727
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
143 AddressLiteral cnt_addrlit(SafepointSynchronize::safepoint_counter_addr());
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
144 __ sethi (cnt_addrlit, G3);
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
145 Address cnt_addr(G3, cnt_addrlit.low10());
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
146 __ ld (cnt_addr, G4);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
147 __ andcc (G4, 1, G0);
a61af66fc99e Initial load
duke
parents:
diff changeset
148 __ br (Assembler::notZero, false, Assembler::pn, label1);
a61af66fc99e Initial load
duke
parents:
diff changeset
149 __ delayed()->srl (O2, 2, O4);
a61af66fc99e Initial load
duke
parents:
diff changeset
150 __ ld_ptr (O1, 0, O5);
a61af66fc99e Initial load
duke
parents:
diff changeset
151 __ add (O5, O4, O5);
a61af66fc99e Initial load
duke
parents:
diff changeset
152
a61af66fc99e Initial load
duke
parents:
diff changeset
153 #ifndef _LP64
a61af66fc99e Initial load
duke
parents:
diff changeset
154 assert(count < LIST_CAPACITY-1, "LIST_CAPACITY too small");
a61af66fc99e Initial load
duke
parents:
diff changeset
155 speculative_load_pclist[count++] = __ pc();
a61af66fc99e Initial load
duke
parents:
diff changeset
156 __ ld (O5, 0, G2);
a61af66fc99e Initial load
duke
parents:
diff changeset
157
a61af66fc99e Initial load
duke
parents:
diff changeset
158 speculative_load_pclist[count] = __ pc();
a61af66fc99e Initial load
duke
parents:
diff changeset
159 __ ld (O5, 4, O3);
a61af66fc99e Initial load
duke
parents:
diff changeset
160 #else
a61af66fc99e Initial load
duke
parents:
diff changeset
161 assert(count < LIST_CAPACITY, "LIST_CAPACITY too small");
a61af66fc99e Initial load
duke
parents:
diff changeset
162 speculative_load_pclist[count] = __ pc();
a61af66fc99e Initial load
duke
parents:
diff changeset
163 __ ldx (O5, 0, O3);
a61af66fc99e Initial load
duke
parents:
diff changeset
164 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
165
727
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
166 __ ld (cnt_addr, G1);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
167 __ cmp (G1, G4);
a61af66fc99e Initial load
duke
parents:
diff changeset
168 __ br (Assembler::notEqual, false, Assembler::pn, label2);
a61af66fc99e Initial load
duke
parents:
diff changeset
169 __ delayed()->mov (O7, G1);
a61af66fc99e Initial load
duke
parents:
diff changeset
170
a61af66fc99e Initial load
duke
parents:
diff changeset
171 #ifndef _LP64
a61af66fc99e Initial load
duke
parents:
diff changeset
172 __ mov (G2, O0);
a61af66fc99e Initial load
duke
parents:
diff changeset
173 __ retl ();
a61af66fc99e Initial load
duke
parents:
diff changeset
174 __ delayed()->mov (O3, O1);
a61af66fc99e Initial load
duke
parents:
diff changeset
175 #else
a61af66fc99e Initial load
duke
parents:
diff changeset
176 __ retl ();
a61af66fc99e Initial load
duke
parents:
diff changeset
177 __ delayed()->mov (O3, O0);
a61af66fc99e Initial load
duke
parents:
diff changeset
178 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
179
a61af66fc99e Initial load
duke
parents:
diff changeset
180 #ifndef _LP64
a61af66fc99e Initial load
duke
parents:
diff changeset
181 slowcase_entry_pclist[count-1] = __ pc();
a61af66fc99e Initial load
duke
parents:
diff changeset
182 slowcase_entry_pclist[count++] = __ pc() ;
a61af66fc99e Initial load
duke
parents:
diff changeset
183 #else
a61af66fc99e Initial load
duke
parents:
diff changeset
184 slowcase_entry_pclist[count++] = __ pc();
a61af66fc99e Initial load
duke
parents:
diff changeset
185 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
186
a61af66fc99e Initial load
duke
parents:
diff changeset
187 __ bind (label1);
a61af66fc99e Initial load
duke
parents:
diff changeset
188 __ mov (O7, G1);
a61af66fc99e Initial load
duke
parents:
diff changeset
189
a61af66fc99e Initial load
duke
parents:
diff changeset
190 address slow_case_addr = jni_GetLongField_addr();
a61af66fc99e Initial load
duke
parents:
diff changeset
191 __ bind (label2);
a61af66fc99e Initial load
duke
parents:
diff changeset
192 __ call (slow_case_addr, relocInfo::none);
a61af66fc99e Initial load
duke
parents:
diff changeset
193 __ delayed()->mov (G1, O7);
a61af66fc99e Initial load
duke
parents:
diff changeset
194
a61af66fc99e Initial load
duke
parents:
diff changeset
195 __ flush ();
a61af66fc99e Initial load
duke
parents:
diff changeset
196
a61af66fc99e Initial load
duke
parents:
diff changeset
197 return fast_entry;
a61af66fc99e Initial load
duke
parents:
diff changeset
198 }
a61af66fc99e Initial load
duke
parents:
diff changeset
199
a61af66fc99e Initial load
duke
parents:
diff changeset
200 address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
a61af66fc99e Initial load
duke
parents:
diff changeset
201 const char *name;
a61af66fc99e Initial load
duke
parents:
diff changeset
202 switch (type) {
a61af66fc99e Initial load
duke
parents:
diff changeset
203 case T_FLOAT: name = "jni_fast_GetFloatField"; break;
a61af66fc99e Initial load
duke
parents:
diff changeset
204 case T_DOUBLE: name = "jni_fast_GetDoubleField"; break;
a61af66fc99e Initial load
duke
parents:
diff changeset
205 default: ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
206 }
a61af66fc99e Initial load
duke
parents:
diff changeset
207 ResourceMark rm;
1748
3e8fbc61cee8 6978355: renaming for 6961697
twisti
parents: 1552
diff changeset
208 BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
3e8fbc61cee8 6978355: renaming for 6961697
twisti
parents: 1552
diff changeset
209 CodeBuffer cbuf(blob);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
210 MacroAssembler* masm = new MacroAssembler(&cbuf);
1748
3e8fbc61cee8 6978355: renaming for 6961697
twisti
parents: 1552
diff changeset
211 address fast_entry = __ pc();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
212
a61af66fc99e Initial load
duke
parents:
diff changeset
213 Label label1, label2;
a61af66fc99e Initial load
duke
parents:
diff changeset
214
727
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
215 AddressLiteral cnt_addrlit(SafepointSynchronize::safepoint_counter_addr());
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
216 __ sethi (cnt_addrlit, O3);
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
217 Address cnt_addr(O3, cnt_addrlit.low10());
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
218 __ ld (cnt_addr, G4);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
219 __ andcc (G4, 1, G0);
a61af66fc99e Initial load
duke
parents:
diff changeset
220 __ br (Assembler::notZero, false, Assembler::pn, label1);
a61af66fc99e Initial load
duke
parents:
diff changeset
221 __ delayed()->srl (O2, 2, O4);
a61af66fc99e Initial load
duke
parents:
diff changeset
222 __ ld_ptr (O1, 0, O5);
a61af66fc99e Initial load
duke
parents:
diff changeset
223
a61af66fc99e Initial load
duke
parents:
diff changeset
224 assert(count < LIST_CAPACITY, "LIST_CAPACITY too small");
a61af66fc99e Initial load
duke
parents:
diff changeset
225 speculative_load_pclist[count] = __ pc();
a61af66fc99e Initial load
duke
parents:
diff changeset
226 switch (type) {
a61af66fc99e Initial load
duke
parents:
diff changeset
227 case T_FLOAT: __ ldf (FloatRegisterImpl::S, O5, O4, F0); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
228 case T_DOUBLE: __ ldf (FloatRegisterImpl::D, O5, O4, F0); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
229 default: ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
230 }
a61af66fc99e Initial load
duke
parents:
diff changeset
231
727
6b2273dd6fa9 6822110: Add AddressLiteral class on SPARC
twisti
parents: 0
diff changeset
232 __ ld (cnt_addr, O5);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
233 __ cmp (O5, G4);
a61af66fc99e Initial load
duke
parents:
diff changeset
234 __ br (Assembler::notEqual, false, Assembler::pn, label2);
a61af66fc99e Initial load
duke
parents:
diff changeset
235 __ delayed()->mov (O7, G1);
a61af66fc99e Initial load
duke
parents:
diff changeset
236
a61af66fc99e Initial load
duke
parents:
diff changeset
237 __ retl ();
a61af66fc99e Initial load
duke
parents:
diff changeset
238 __ delayed()-> nop ();
a61af66fc99e Initial load
duke
parents:
diff changeset
239
a61af66fc99e Initial load
duke
parents:
diff changeset
240 slowcase_entry_pclist[count++] = __ pc();
a61af66fc99e Initial load
duke
parents:
diff changeset
241 __ bind (label1);
a61af66fc99e Initial load
duke
parents:
diff changeset
242 __ mov (O7, G1);
a61af66fc99e Initial load
duke
parents:
diff changeset
243
a61af66fc99e Initial load
duke
parents:
diff changeset
244 address slow_case_addr;
a61af66fc99e Initial load
duke
parents:
diff changeset
245 switch (type) {
a61af66fc99e Initial load
duke
parents:
diff changeset
246 case T_FLOAT: slow_case_addr = jni_GetFloatField_addr(); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
247 case T_DOUBLE: slow_case_addr = jni_GetDoubleField_addr(); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
248 default: ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
249 }
a61af66fc99e Initial load
duke
parents:
diff changeset
250 __ bind (label2);
a61af66fc99e Initial load
duke
parents:
diff changeset
251 __ call (slow_case_addr, relocInfo::none);
a61af66fc99e Initial load
duke
parents:
diff changeset
252 __ delayed()->mov (G1, O7);
a61af66fc99e Initial load
duke
parents:
diff changeset
253
a61af66fc99e Initial load
duke
parents:
diff changeset
254 __ flush ();
a61af66fc99e Initial load
duke
parents:
diff changeset
255
a61af66fc99e Initial load
duke
parents:
diff changeset
256 return fast_entry;
a61af66fc99e Initial load
duke
parents:
diff changeset
257 }
a61af66fc99e Initial load
duke
parents:
diff changeset
258
a61af66fc99e Initial load
duke
parents:
diff changeset
259 address JNI_FastGetField::generate_fast_get_float_field() {
a61af66fc99e Initial load
duke
parents:
diff changeset
260 return generate_fast_get_float_field0(T_FLOAT);
a61af66fc99e Initial load
duke
parents:
diff changeset
261 }
a61af66fc99e Initial load
duke
parents:
diff changeset
262
a61af66fc99e Initial load
duke
parents:
diff changeset
263 address JNI_FastGetField::generate_fast_get_double_field() {
a61af66fc99e Initial load
duke
parents:
diff changeset
264 return generate_fast_get_float_field0(T_DOUBLE);
a61af66fc99e Initial load
duke
parents:
diff changeset
265 }