< prev index next >

src/cpu/ppc/vm/templateTable_ppc_64.cpp

Print this page
rev 12861 : ppc64 addons for 8171392: make contant pool read-only

@@ -1,8 +1,8 @@
 /*
- * 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -3658,15 +3658,13 @@
     __ lbzx(Rtags, Rindex, Rtags);
 
     __ 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);
     __ lwz(Rinstance_size, in_bytes(Klass::layout_helper_offset()), RinstanceKlass);
 

@@ -3873,13 +3871,11 @@
   __ b(Lresolved);
 
   // 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);
   // Get value klass in RobjKlass.
   __ load_klass(RobjKlass, R17_tos);

@@ -3937,13 +3933,11 @@
   __ b(Lresolved);
 
   // 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);
   // Get value klass in RobjKlass.
   __ load_klass(RobjKlass, R17_tos);
< prev index next >