2009 check_klass_subtype_fast_path(sub_klass, super_klass, temp1_reg, temp2_reg, &L_success, &L_failure); |
2009 check_klass_subtype_fast_path(sub_klass, super_klass, temp1_reg, temp2_reg, &L_success, &L_failure); |
2010 check_klass_subtype_slow_path(sub_klass, super_klass, temp1_reg, temp2_reg, &L_success); |
2010 check_klass_subtype_slow_path(sub_klass, super_klass, temp1_reg, temp2_reg, &L_success); |
2011 bind(L_failure); // Fallthru if not successful. |
2011 bind(L_failure); // Fallthru if not successful. |
2012 } |
2012 } |
2013 |
2013 |
|
2014 void MacroAssembler::clinit_barrier(Register klass, Register thread, Label* L_fast_path, Label* L_slow_path) { |
|
2015 assert(L_fast_path != NULL || L_slow_path != NULL, "at least one is required"); |
|
2016 |
|
2017 Label L_fallthrough; |
|
2018 if (L_fast_path == NULL) { |
|
2019 L_fast_path = &L_fallthrough; |
|
2020 } else if (L_slow_path == NULL) { |
|
2021 L_slow_path = &L_fallthrough; |
|
2022 } |
|
2023 |
|
2024 // Fast path check: class is fully initialized |
|
2025 lbz(R0, in_bytes(InstanceKlass::init_state_offset()), klass); |
|
2026 cmpwi(CCR0, R0, InstanceKlass::fully_initialized); |
|
2027 beq(CCR0, *L_fast_path); |
|
2028 |
|
2029 // Fast path check: current thread is initializer thread |
|
2030 ld(R0, in_bytes(InstanceKlass::init_thread_offset()), klass); |
|
2031 cmpd(CCR0, thread, R0); |
|
2032 if (L_slow_path == &L_fallthrough) { |
|
2033 beq(CCR0, *L_fast_path); |
|
2034 } else if (L_fast_path == &L_fallthrough) { |
|
2035 bne(CCR0, *L_slow_path); |
|
2036 } else { |
|
2037 Unimplemented(); |
|
2038 } |
|
2039 |
|
2040 bind(L_fallthrough); |
|
2041 } |
|
2042 |
2014 void MacroAssembler::check_method_handle_type(Register mtype_reg, Register mh_reg, |
2043 void MacroAssembler::check_method_handle_type(Register mtype_reg, Register mh_reg, |
2015 Register temp_reg, |
2044 Register temp_reg, |
2016 Label& wrong_method_type) { |
2045 Label& wrong_method_type) { |
2017 assert_different_registers(mtype_reg, mh_reg, temp_reg); |
2046 assert_different_registers(mtype_reg, mh_reg, temp_reg); |
2018 // Compare method type against that of the receiver. |
2047 // Compare method type against that of the receiver. |
3190 void MacroAssembler::load_mirror_from_const_method(Register mirror, Register const_method) { |
3219 void MacroAssembler::load_mirror_from_const_method(Register mirror, Register const_method) { |
3191 ld(mirror, in_bytes(ConstMethod::constants_offset()), const_method); |
3220 ld(mirror, in_bytes(ConstMethod::constants_offset()), const_method); |
3192 ld(mirror, ConstantPool::pool_holder_offset_in_bytes(), mirror); |
3221 ld(mirror, ConstantPool::pool_holder_offset_in_bytes(), mirror); |
3193 ld(mirror, in_bytes(Klass::java_mirror_offset()), mirror); |
3222 ld(mirror, in_bytes(Klass::java_mirror_offset()), mirror); |
3194 resolve_oop_handle(mirror); |
3223 resolve_oop_handle(mirror); |
|
3224 } |
|
3225 |
|
3226 void MacroAssembler::load_method_holder(Register holder, Register method) { |
|
3227 ld(holder, in_bytes(Method::const_offset()), method); |
|
3228 ld(holder, in_bytes(ConstMethod::constants_offset()), holder); |
|
3229 ld(holder, ConstantPool::pool_holder_offset_in_bytes(), holder); |
3195 } |
3230 } |
3196 |
3231 |
3197 // Clear Array |
3232 // Clear Array |
3198 // For very short arrays. tmp == R0 is allowed. |
3233 // For very short arrays. tmp == R0 is allowed. |
3199 void MacroAssembler::clear_memory_unrolled(Register base_ptr, int cnt_dwords, Register tmp, int offset) { |
3234 void MacroAssembler::clear_memory_unrolled(Register base_ptr, int cnt_dwords, Register tmp, int offset) { |