|
1 | 1 | /* |
2 | | - * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * Copyright (c) 2012, 2025 SAP SE. All rights reserved. |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
@@ -1237,26 +1237,24 @@ void SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm, |
1237 | 1237 |
|
1238 | 1238 | // Class initialization barrier for static methods |
1239 | 1239 | entry_address[AdapterBlob::C2I_No_Clinit_Check] = nullptr; |
1240 | | - if (VM_Version::supports_fast_class_init_checks()) { |
1241 | | - Label L_skip_barrier; |
| 1240 | + assert(VM_Version::supports_fast_class_init_checks(), "sanity"); |
| 1241 | + Label L_skip_barrier; |
1242 | 1242 |
|
1243 | | - { // Bypass the barrier for non-static methods |
1244 | | - __ lhz(R0, in_bytes(Method::access_flags_offset()), R19_method); |
1245 | | - __ andi_(R0, R0, JVM_ACC_STATIC); |
1246 | | - __ beq(CR0, L_skip_barrier); // non-static |
1247 | | - } |
| 1243 | + // Bypass the barrier for non-static methods |
| 1244 | + __ lhz(R0, in_bytes(Method::access_flags_offset()), R19_method); |
| 1245 | + __ andi_(R0, R0, JVM_ACC_STATIC); |
| 1246 | + __ beq(CR0, L_skip_barrier); // non-static |
1248 | 1247 |
|
1249 | | - Register klass = R11_scratch1; |
1250 | | - __ load_method_holder(klass, R19_method); |
1251 | | - __ clinit_barrier(klass, R16_thread, &L_skip_barrier /*L_fast_path*/); |
| 1248 | + Register klass = R11_scratch1; |
| 1249 | + __ load_method_holder(klass, R19_method); |
| 1250 | + __ clinit_barrier(klass, R16_thread, &L_skip_barrier /*L_fast_path*/); |
1252 | 1251 |
|
1253 | | - __ load_const_optimized(klass, SharedRuntime::get_handle_wrong_method_stub(), R0); |
1254 | | - __ mtctr(klass); |
1255 | | - __ bctr(); |
| 1252 | + __ load_const_optimized(klass, SharedRuntime::get_handle_wrong_method_stub(), R0); |
| 1253 | + __ mtctr(klass); |
| 1254 | + __ bctr(); |
1256 | 1255 |
|
1257 | | - __ bind(L_skip_barrier); |
1258 | | - entry_address[AdapterBlob::C2I_No_Clinit_Check] = __ pc(); |
1259 | | - } |
| 1256 | + __ bind(L_skip_barrier); |
| 1257 | + entry_address[AdapterBlob::C2I_No_Clinit_Check] = __ pc(); |
1260 | 1258 |
|
1261 | 1259 | BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler(); |
1262 | 1260 | bs->c2i_entry_barrier(masm, /* tmp register*/ ic_klass, /* tmp register*/ receiver_klass, /* tmp register*/ code); |
@@ -2210,7 +2208,8 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, |
2210 | 2208 | // -------------------------------------------------------------------------- |
2211 | 2209 | vep_start_pc = (intptr_t)__ pc(); |
2212 | 2210 |
|
2213 | | - if (VM_Version::supports_fast_class_init_checks() && method->needs_clinit_barrier()) { |
| 2211 | + if (method->needs_clinit_barrier()) { |
| 2212 | + assert(VM_Version::supports_fast_class_init_checks(), "sanity"); |
2214 | 2213 | Label L_skip_barrier; |
2215 | 2214 | Register klass = r_temp_1; |
2216 | 2215 | // Notify OOP recorder (don't need the relocation) |
|
0 commit comments