hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp
changeset 46427 54713555867e
parent 42068 18c8a4d5998e
child 46487 f8e5223d1501
equal deleted inserted replaced
46426:02a1fc064144 46427:54713555867e
     1 /*
     1 /*
     2  * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * Copyright (c) 2013, 2016 SAP SE. All rights reserved.
     3  * Copyright (c) 2013, 2017 SAP SE. All rights reserved.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5  *
     5  *
     6  * This code is free software; you can redistribute it and/or modify it
     6  * This code is free software; you can redistribute it and/or modify it
     7  * under the terms of the GNU General Public License version 2 only, as
     7  * under the terms of the GNU General Public License version 2 only, as
     8  * published by the Free Software Foundation.
     8  * published by the Free Software Foundation.
  3658     __ lbzx(Rtags, Rindex, Rtags);
  3658     __ lbzx(Rtags, Rindex, Rtags);
  3659 
  3659 
  3660     __ cmpdi(CCR0, Rtags, JVM_CONSTANT_Class);
  3660     __ cmpdi(CCR0, Rtags, JVM_CONSTANT_Class);
  3661     __ bne(CCR0, Lslow_case);
  3661     __ bne(CCR0, Lslow_case);
  3662 
  3662 
  3663     // Get instanceKlass (load from Rcpool + sizeof(ConstantPool) + Rindex*BytesPerWord).
  3663     // Get instanceKlass
  3664     __ sldi(Roffset, Rindex, LogBytesPerWord);
  3664     __ sldi(Roffset, Rindex, LogBytesPerWord);
  3665     __ addi(Rscratch, Rcpool, sizeof(ConstantPool));
  3665     __ load_resolved_klass_at_offset(Rcpool, Roffset, RinstanceKlass);
  3666     __ isync(); // Order load of instance Klass wrt. tags.
       
  3667     __ ldx(RinstanceKlass, Roffset, Rscratch);
       
  3668 
  3666 
  3669     // Make sure klass is fully initialized and get instance_size.
  3667     // Make sure klass is fully initialized and get instance_size.
  3670     __ lbz(Rscratch, in_bytes(InstanceKlass::init_state_offset()), RinstanceKlass);
  3668     __ lbz(Rscratch, in_bytes(InstanceKlass::init_state_offset()), RinstanceKlass);
  3671     __ lwz(Rinstance_size, in_bytes(Klass::layout_helper_offset()), RinstanceKlass);
  3669     __ lwz(Rinstance_size, in_bytes(Klass::layout_helper_offset()), RinstanceKlass);
  3672 
  3670 
  3873   __ b(Lresolved);
  3871   __ b(Lresolved);
  3874 
  3872 
  3875   // Extract target class from constant pool.
  3873   // Extract target class from constant pool.
  3876   __ bind(Lquicked);
  3874   __ bind(Lquicked);
  3877   __ sldi(Roffset, Roffset, LogBytesPerWord);
  3875   __ sldi(Roffset, Roffset, LogBytesPerWord);
  3878   __ addi(Rcpool, Rcpool, sizeof(ConstantPool));
  3876   __ load_resolved_klass_at_offset(Rcpool, Roffset, RspecifiedKlass);
  3879   __ isync(); // Order load of specified Klass wrt. tags.
       
  3880   __ ldx(RspecifiedKlass, Rcpool, Roffset);
       
  3881 
  3877 
  3882   // Do the checkcast.
  3878   // Do the checkcast.
  3883   __ bind(Lresolved);
  3879   __ bind(Lresolved);
  3884   // Get value klass in RobjKlass.
  3880   // Get value klass in RobjKlass.
  3885   __ load_klass(RobjKlass, R17_tos);
  3881   __ load_klass(RobjKlass, R17_tos);
  3937   __ b(Lresolved);
  3933   __ b(Lresolved);
  3938 
  3934 
  3939   // Extract target class from constant pool.
  3935   // Extract target class from constant pool.
  3940   __ bind(Lquicked);
  3936   __ bind(Lquicked);
  3941   __ sldi(Roffset, Roffset, LogBytesPerWord);
  3937   __ sldi(Roffset, Roffset, LogBytesPerWord);
  3942   __ addi(Rcpool, Rcpool, sizeof(ConstantPool));
  3938   __ load_resolved_klass_at_offset(Rcpool, Roffset, RspecifiedKlass);
  3943   __ isync(); // Order load of specified Klass wrt. tags.
       
  3944   __ ldx(RspecifiedKlass, Rcpool, Roffset);
       
  3945 
  3939 
  3946   // Do the checkcast.
  3940   // Do the checkcast.
  3947   __ bind(Lresolved);
  3941   __ bind(Lresolved);
  3948   // Get value klass in RobjKlass.
  3942   // Get value klass in RobjKlass.
  3949   __ load_klass(RobjKlass, R17_tos);
  3943   __ load_klass(RobjKlass, R17_tos);