diff --git a/src/cpu/sparc/vm/methodHandles_sparc.cpp b/src/cpu/sparc/vm/methodHandles_sparc.cpp index 27b873b72007db658fd2293e6388be0ce45ba63a..400ec0f002073fcf5e644011fae0ebda3788bea3 100644 --- a/src/cpu/sparc/vm/methodHandles_sparc.cpp +++ b/src/cpu/sparc/vm/methodHandles_sparc.cpp @@ -1126,7 +1126,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan adjust_SP_and_Gargs_down_by_slots(_masm, 3, noreg, noreg); - __ st_ptr(O0_code, __ argument_address(constant(2), noreg, 0)); + __ st (O0_code, __ argument_address(constant(2), noreg, 0)); __ st_ptr(O1_actual, __ argument_address(constant(1), noreg, 0)); __ st_ptr(O2_required, __ argument_address(constant(0), noreg, 0)); jump_from_method_handle(_masm, G5_method, O1_scratch, O2_scratch); diff --git a/src/cpu/x86/vm/methodHandles_x86.cpp b/src/cpu/x86/vm/methodHandles_x86.cpp index 30b62c9c568d5bcfc5a65cd9027cfbe4adab7914..7febe3ae6c49e3dd2709aa4837e9daed0fccd63f 100644 --- a/src/cpu/x86/vm/methodHandles_x86.cpp +++ b/src/cpu/x86/vm/methodHandles_x86.cpp @@ -1192,11 +1192,11 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan const int jobject_oop_offset = 0; __ movptr(rbx_method, Address(rbx_method, jobject_oop_offset)); // dereference the jobject - __ movptr(rsi, rsp); + __ movptr(saved_last_sp, rsp); __ subptr(rsp, 3 * wordSize); __ push(rax_pc); // restore caller PC - __ movptr(__ argument_address(constant(2)), rarg0_code); + __ movl (__ argument_address(constant(2)), rarg0_code); __ movptr(__ argument_address(constant(1)), rarg1_actual); __ movptr(__ argument_address(constant(0)), rarg2_required); jump_from_method_handle(_masm, rbx_method, rax);