Skip to content

Commit ef62b61

Browse files
committedOct 21, 2022
8295703: RISC-V: Remove implicit noreg temp register arguments in MacroAssembler
Reviewed-by: shade, fjiang
1 parent 6240431 commit ef62b61

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed
 

‎src/hotspot/cpu/riscv/interp_masm_riscv.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ void InterpreterMacroAssembler::load_resolved_reference_at_index(
287287
// Add in the index
288288
addi(index, index, arrayOopDesc::base_offset_in_bytes(T_OBJECT) >> LogBytesPerHeapOop);
289289
shadd(result, index, result, index, LogBytesPerHeapOop);
290-
load_heap_oop(result, Address(result, 0));
290+
load_heap_oop(result, Address(result, 0), tmp, t1);
291291
}
292292

293293
void InterpreterMacroAssembler::load_resolved_klass_at_offset(

‎src/hotspot/cpu/riscv/macroAssembler_riscv.hpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,12 @@ class MacroAssembler: public Assembler {
206206
void decode_heap_oop(Register r) { decode_heap_oop(r, r); }
207207
void encode_heap_oop(Register d, Register s);
208208
void encode_heap_oop(Register r) { encode_heap_oop(r, r); };
209-
void load_heap_oop(Register dst, Address src, Register tmp1 = noreg,
210-
Register tmp2 = noreg, DecoratorSet decorators = 0);
211-
void load_heap_oop_not_null(Register dst, Address src, Register tmp1 = noreg,
212-
Register tmp2 = noreg, DecoratorSet decorators = 0);
213-
void store_heap_oop(Address dst, Register val, Register tmp1 = noreg,
214-
Register tmp2 = noreg, Register tmp3 = noreg, DecoratorSet decorators = 0);
209+
void load_heap_oop(Register dst, Address src, Register tmp1,
210+
Register tmp2, DecoratorSet decorators = 0);
211+
void load_heap_oop_not_null(Register dst, Address src, Register tmp1,
212+
Register tmp2, DecoratorSet decorators = 0);
213+
void store_heap_oop(Address dst, Register val, Register tmp1,
214+
Register tmp2, Register tmp3, DecoratorSet decorators = 0);
215215

216216
void store_klass_gap(Register dst, Register src);
217217

‎src/hotspot/cpu/riscv/methodHandles_riscv.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
136136

137137
// Load the invoker, as MH -> MH.form -> LF.vmentry
138138
__ verify_oop(recv);
139-
__ load_heap_oop(method_temp, Address(recv, NONZERO(java_lang_invoke_MethodHandle::form_offset())), temp2);
139+
__ load_heap_oop(method_temp, Address(recv, NONZERO(java_lang_invoke_MethodHandle::form_offset())), temp2, t1);
140140
__ verify_oop(method_temp);
141-
__ load_heap_oop(method_temp, Address(method_temp, NONZERO(java_lang_invoke_LambdaForm::vmentry_offset())), temp2);
141+
__ load_heap_oop(method_temp, Address(method_temp, NONZERO(java_lang_invoke_LambdaForm::vmentry_offset())), temp2, t1);
142142
__ verify_oop(method_temp);
143-
__ load_heap_oop(method_temp, Address(method_temp, NONZERO(java_lang_invoke_MemberName::method_offset())), temp2);
143+
__ load_heap_oop(method_temp, Address(method_temp, NONZERO(java_lang_invoke_MemberName::method_offset())), temp2, t1);
144144
__ verify_oop(method_temp);
145145
__ access_load_at(T_ADDRESS, IN_HEAP, method_temp, Address(method_temp, NONZERO(java_lang_invoke_ResolvedMethodName::vmtarget_offset())), noreg, noreg);
146146

@@ -321,7 +321,7 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
321321
if (VerifyMethodHandles && iid != vmIntrinsics::_linkToInterface) {
322322
Label L_ok;
323323
Register temp2_defc = temp2;
324-
__ load_heap_oop(temp2_defc, member_clazz, temp3);
324+
__ load_heap_oop(temp2_defc, member_clazz, temp3, t1);
325325
load_klass_from_Class(_masm, temp2_defc);
326326
__ verify_klass_ptr(temp2_defc);
327327
__ check_klass_subtype(temp1_recv_klass, temp2_defc, temp3, L_ok);
@@ -348,15 +348,15 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
348348
if (VerifyMethodHandles) {
349349
verify_ref_kind(_masm, JVM_REF_invokeSpecial, member_reg, temp3);
350350
}
351-
__ load_heap_oop(xmethod, member_vmtarget);
351+
__ load_heap_oop(xmethod, member_vmtarget, temp3, t1);
352352
__ access_load_at(T_ADDRESS, IN_HEAP, xmethod, vmtarget_method, noreg, noreg);
353353
break;
354354

355355
case vmIntrinsics::_linkToStatic:
356356
if (VerifyMethodHandles) {
357357
verify_ref_kind(_masm, JVM_REF_invokeStatic, member_reg, temp3);
358358
}
359-
__ load_heap_oop(xmethod, member_vmtarget);
359+
__ load_heap_oop(xmethod, member_vmtarget, temp3, t1);
360360
__ access_load_at(T_ADDRESS, IN_HEAP, xmethod, vmtarget_method, noreg, noreg);
361361
break;
362362

@@ -397,7 +397,7 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
397397
}
398398

399399
Register temp3_intf = temp3;
400-
__ load_heap_oop(temp3_intf, member_clazz);
400+
__ load_heap_oop(temp3_intf, member_clazz, temp2, t1);
401401
load_klass_from_Class(_masm, temp3_intf);
402402
__ verify_klass_ptr(temp3_intf);
403403

0 commit comments

Comments
 (0)
Please sign in to comment.