1 /* |
1 /* |
2 * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. |
3 * Copyright (c) 2015, 2018, Loongson Technology. All rights reserved. |
3 * Copyright (c) 2015, 2019, Loongson Technology. All rights reserved. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 * |
5 * |
6 * This code is free software; you can redistribute it and/or modify it |
6 * This code is free software; you can redistribute it and/or modify it |
7 * under the terms of the GNU General Public License version 2 only, as |
7 * under the terms of the GNU General Public License version 2 only, as |
8 * published by the Free Software Foundation. |
8 * published by the Free Software Foundation. |
63 |
63 |
64 address counter_addr = SafepointSynchronize::safepoint_counter_addr(); |
64 address counter_addr = SafepointSynchronize::safepoint_counter_addr(); |
65 __ set64(AT, (long)counter_addr); |
65 __ set64(AT, (long)counter_addr); |
66 __ lw(T1, AT, 0); |
66 __ lw(T1, AT, 0); |
67 |
67 |
68 /* 2012/4/28 Jin: the parameters(A0~A3) should not be modified, since |
68 // Parameters(A0~A3) should not be modified, since they will be used in slow path |
69 * they will be used in slow path. */ |
|
70 __ andi(AT, T1, 1); |
69 __ andi(AT, T1, 1); |
71 __ bne(AT, R0, slow); |
70 __ bne(AT, R0, slow); |
72 __ delayed()->nop(); |
71 __ delayed()->nop(); |
73 |
72 |
74 __ ld(T0, A1, 0); // unbox, *obj |
73 __ move(T0, A1); |
|
74 __ clear_jweak_tag(T0); |
|
75 |
|
76 __ ld(T0, T0, 0); // unbox, *obj |
75 __ move(T2, A2); |
77 __ move(T2, A2); |
76 __ shr(T2, 2); // offset |
78 __ shr(T2, 2); // offset |
77 __ dadd(T0, T0, T2); |
79 __ dadd(T0, T0, T2); |
78 |
80 |
79 assert(count < LIST_CAPACITY, "LIST_CAPACITY too small"); |
81 assert(count < LIST_CAPACITY, "LIST_CAPACITY too small"); |
169 #endif |
171 #endif |
170 __ andi(AT, T1, 1); |
172 __ andi(AT, T1, 1); |
171 __ bne(AT, R0, slow); |
173 __ bne(AT, R0, slow); |
172 __ delayed()->nop(); |
174 __ delayed()->nop(); |
173 |
175 |
|
176 __ clear_jweak_tag(A1); |
|
177 |
174 #ifdef _LP64 |
178 #ifdef _LP64 |
175 __ ld(A1, A1, 0); // unbox, *obj |
179 __ ld(A1, A1, 0); // unbox, *obj |
176 #else |
180 #else |
177 __ lw(A1, A1, 0); // unbox, *obj |
181 __ lw(A1, A1, 0); // unbox, *obj |
178 #endif |
182 #endif |
|
183 |
179 __ shr(A2, 2); // offset |
184 __ shr(A2, 2); // offset |
180 __ add(A1, A1, A2); |
185 __ add(A1, A1, A2); |
181 |
186 |
182 assert(count < LIST_CAPACITY, "LIST_CAPACITY too small"); |
187 assert(count < LIST_CAPACITY, "LIST_CAPACITY too small"); |
183 speculative_load_pclist[count] = __ pc(); |
188 speculative_load_pclist[count] = __ pc(); |