--- old/src/cpu/ppc/vm/templateTable_ppc_64.cpp 2017-04-29 08:24:02.313814027 -0700 +++ new/src/cpu/ppc/vm/templateTable_ppc_64.cpp 2017-04-29 08:24:02.157808188 -0700 @@ -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);