changeset 50706:bd198a98f3c5

8202978: Incorrect tmp register passed to MacroAssembler::load_mirror() Reviewed-by: kvn, coleenp
author pliden
date Thu, 17 May 2018 09:35:38 +0200
parents 6d6fe9416864
children 8e4fcfb4cfe4
files src/hotspot/cpu/x86/macroAssembler_x86.cpp src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp	Thu May 17 00:23:28 2018 -0700
+++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp	Thu May 17 09:35:38 2018 +0200
@@ -6276,6 +6276,8 @@
 
 // ((OopHandle)result).resolve();
 void MacroAssembler::resolve_oop_handle(Register result, Register tmp) {
+  assert_different_registers(result, tmp);
+
   // Only 64 bit platforms support GCs that require a tmp register
   // Only IN_HEAP loads require a thread_tmp register
   // OopHandle::resolve is an indirection like jobject.
--- a/src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp	Thu May 17 00:23:28 2018 -0700
+++ b/src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp	Thu May 17 09:35:38 2018 +0200
@@ -973,7 +973,7 @@
     __ testl(t, JVM_ACC_STATIC);
     __ jcc(Assembler::zero, L);
     // get mirror
-    __ load_mirror(t, method);
+    __ load_mirror(t, method, rax);
     // copy mirror into activation frame
     __ movptr(Address(rbp, frame::interpreter_frame_oop_temp_offset * wordSize),
             t);