diff a/src/hotspot/cpu/riscv/interp_masm_riscv.hpp b/src/hotspot/cpu/riscv/interp_masm_riscv.hpp --- a/src/hotspot/cpu/riscv/interp_masm_riscv.hpp +++ b/src/hotspot/cpu/riscv/interp_masm_riscv.hpp @@ -159,10 +159,21 @@ void get_unsigned_2_byte_index_at_bcp(Register reg, int bcp_offset); void get_cache_index_at_bcp(Register index, Register tmp, int bcp_offset, size_t index_size = sizeof(u2)); void get_method_counters(Register method, Register mcs, Label& skip); + // Allocate instance in "obj" and read in the content of the inline field + // NOTES: + // - input holder object via "obj", which must be x10, + // will return new instance via the same reg + // - assumes holder_klass and valueKlass field klass have both been resolved + void read_flat_field(Register entry, Register obj); + + void write_flat_field(Register entry, Register field_offset, + Register tmp1, Register tmp2, + Register obj); + // Load cpool->resolved_references(index). void load_resolved_reference_at_index(Register result, Register index, Register tmp = x15); // Load cpool->resolved_klass_at(index). void load_resolved_klass_at_offset(Register cpool, Register index, Register klass, Register temp); @@ -196,11 +207,11 @@ void load_float(Address src); void load_double(Address src); // Generate a subtype check: branch to ok_is_subtype if sub_klass is // a subtype of super_klass. - void gen_subtype_check( Register sub_klass, Label &ok_is_subtype ); + void gen_subtype_check( Register sub_klass, Label &ok_is_subtype, bool profile = true); // Dispatching void dispatch_prolog(TosState state, int step = 0); void dispatch_epilog(TosState state, int step = 0); // dispatch via t0 @@ -269,21 +280,25 @@ // narrow int return value void narrow(Register result); void profile_taken_branch(Register mdp); - void profile_not_taken_branch(Register mdp); + void profile_not_taken_branch(Register mdp, bool acmp = false); void profile_call(Register mdp); void profile_final_call(Register mdp); void profile_virtual_call(Register receiver, Register mdp); void profile_ret(Register return_bci, Register mdp); void profile_null_seen(Register mdp); void profile_typecheck(Register mdp, Register klass); void profile_typecheck_failed(Register mdp); void profile_switch_default(Register mdp); void profile_switch_case(Register index_in_scratch, Register mdp, Register temp); + template void profile_array_type(Register mdp, Register array, Register tmp); + void profile_multiple_element_types(Register mdp, Register element, Register tmp, Register tmp2); + void profile_element_type(Register mdp, Register element, Register tmp); + void profile_acmp(Register mdp, Register left, Register right, Register tmp); void profile_obj_type(Register obj, const Address& mdo_addr, Register tmp); void profile_arguments_type(Register mdp, Register callee, Register tmp, bool is_virtual); void profile_return_type(Register mdp, Register ret, Register tmp); void profile_parameters_type(Register mdp, Register tmp1, Register tmp2, Register tmp3);