hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp
changeset 46427 54713555867e
parent 42068 18c8a4d5998e
child 46487 f8e5223d1501
--- a/hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp	Wed May 03 02:32:02 2017 +0000
+++ b/hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp	Fri Mar 03 23:08:35 2017 -0800
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013, 2016 SAP SE. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -3660,11 +3660,9 @@
     __ cmpdi(CCR0, Rtags, JVM_CONSTANT_Class);
     __ bne(CCR0, Lslow_case);
 
-    // Get instanceKlass (load from Rcpool + sizeof(ConstantPool) + Rindex*BytesPerWord).
+    // Get instanceKlass
     __ sldi(Roffset, Rindex, LogBytesPerWord);
-    __ addi(Rscratch, Rcpool, sizeof(ConstantPool));
-    __ isync(); // Order load of instance Klass wrt. tags.
-    __ ldx(RinstanceKlass, Roffset, Rscratch);
+    __ load_resolved_klass_at_offset(Rcpool, Roffset, RinstanceKlass);
 
     // Make sure klass is fully initialized and get instance_size.
     __ lbz(Rscratch, in_bytes(InstanceKlass::init_state_offset()), RinstanceKlass);
@@ -3875,9 +3873,7 @@
   // Extract target class from constant pool.
   __ bind(Lquicked);
   __ sldi(Roffset, Roffset, LogBytesPerWord);
-  __ addi(Rcpool, Rcpool, sizeof(ConstantPool));
-  __ isync(); // Order load of specified Klass wrt. tags.
-  __ ldx(RspecifiedKlass, Rcpool, Roffset);
+  __ load_resolved_klass_at_offset(Rcpool, Roffset, RspecifiedKlass);
 
   // Do the checkcast.
   __ bind(Lresolved);
@@ -3939,9 +3935,7 @@
   // Extract target class from constant pool.
   __ bind(Lquicked);
   __ sldi(Roffset, Roffset, LogBytesPerWord);
-  __ addi(Rcpool, Rcpool, sizeof(ConstantPool));
-  __ isync(); // Order load of specified Klass wrt. tags.
-  __ ldx(RspecifiedKlass, Rcpool, Roffset);
+  __ load_resolved_klass_at_offset(Rcpool, Roffset, RspecifiedKlass);
 
   // Do the checkcast.
   __ bind(Lresolved);