changeset 48707:51d97ee431ff

8196136: AArch64: Correct register use in patch for JDK-8195685 Summary: itable stubs must not use java argument registers as scratch registers Reviewed-by: aph
author adinn
date Thu, 25 Jan 2018 11:56:32 +0000
parents 2da4a52715d8
children ea6706103cef
files src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp	Thu Jan 25 05:57:22 2018 -0800
+++ b/src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp	Thu Jan 25 11:56:32 2018 +0000
@@ -63,8 +63,8 @@
 
 #ifndef PRODUCT
   if (CountCompiledCalls) {
-    __ lea(r19, ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr()));
-    __ incrementw(Address(r19));
+    __ lea(r16, ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr()));
+    __ incrementw(Address(r16));
   }
 #endif
 
@@ -73,13 +73,13 @@
 
   // get receiver klass
   address npe_addr = __ pc();
-  __ load_klass(r19, j_rarg0);
+  __ load_klass(r16, j_rarg0);
 
 #ifndef PRODUCT
   if (DebugVtables) {
     Label L;
     // check offset vs vtable length
-    __ ldrw(rscratch1, Address(r19, Klass::vtable_length_offset()));
+    __ ldrw(rscratch1, Address(r16, Klass::vtable_length_offset()));
     __ cmpw(rscratch1, vtable_index * vtableEntry::size());
     __ br(Assembler::GT, L);
     __ enter();
@@ -91,7 +91,7 @@
   }
 #endif // PRODUCT
 
-  __ lookup_virtual_method(r19, vtable_index, rmethod);
+  __ lookup_virtual_method(r16, vtable_index, rmethod);
 
   if (DebugVtables) {
     Label L;
@@ -145,9 +145,9 @@
   //  j_rarg0: Receiver
 
 
-  // Most registers are in use; we'll use r0, rmethod, r10, r11
+  // Most registers are in use; we'll use r16, rmethod, r10, r11
   const Register recv_klass_reg     = r10;
-  const Register holder_klass_reg   = r0; // declaring interface klass (DECC)
+  const Register holder_klass_reg   = r16; // declaring interface klass (DECC)
   const Register resolved_klass_reg = rmethod; // resolved interface klass (REFC)
   const Register temp_reg           = r11;
   const Register icholder_reg       = rscratch2;