8324125: Improve class initialization barrier in TemplateTable::_new for RISC-V
Reviewed-by: fyang, rehn
This commit is contained in:
parent
b6d364ad88
commit
a1d65eb6d8
@ -3547,11 +3547,10 @@ void TemplateTable::_new() {
|
||||
// get InstanceKlass
|
||||
__ load_resolved_klass_at_offset(x14, x13, x14, t0);
|
||||
|
||||
// make sure klass is initialized & doesn't have finalizer
|
||||
// make sure klass is fully initialized
|
||||
__ lbu(t0, Address(x14, InstanceKlass::init_state_offset()));
|
||||
__ sub(t1, t0, (u1)InstanceKlass::fully_initialized);
|
||||
__ bnez(t1, slow_case);
|
||||
// make sure klass is initialized
|
||||
assert(VM_Version::supports_fast_class_init_checks(),
|
||||
"Optimization requires support for fast class initialization checks");
|
||||
__ clinit_barrier(x14, t0, nullptr /*L_fast_path*/, &slow_case);
|
||||
|
||||
// get instance_size in InstanceKlass (scaled to a count of bytes)
|
||||
__ lwu(x13, Address(x14, Klass::layout_helper_offset()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user