hotspot/src/cpu/s390/vm/templateTable_s390.cpp
changeset 46427 54713555867e
parent 46280 6eef3d367beb
equal deleted inserted replaced
46426:02a1fc064144 46427:54713555867e
     1 /*
     1 /*
     2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * Copyright (c) 2016 SAP SE. All rights reserved.
     3  * Copyright (c) 2016, 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.
  3706   __ z_brne(slow_case);
  3706   __ z_brne(slow_case);
  3707 
  3707 
  3708   __ z_sllg(offset, offset, LogBytesPerWord); // Convert to to offset.
  3708   __ z_sllg(offset, offset, LogBytesPerWord); // Convert to to offset.
  3709   // Get InstanceKlass.
  3709   // Get InstanceKlass.
  3710   Register iklass = cpool;
  3710   Register iklass = cpool;
  3711   __ z_lg(iklass, Address(cpool, offset, sizeof(ConstantPool)));
  3711   __ load_resolved_klass_at_offset(cpool, offset, iklass);
  3712 
  3712 
  3713   // Make sure klass is initialized & doesn't have finalizer.
  3713   // Make sure klass is initialized & doesn't have finalizer.
  3714   // Make sure klass is fully initialized.
  3714   // Make sure klass is fully initialized.
  3715   const int state_offset = in_bytes(InstanceKlass::init_state_offset());
  3715   const int state_offset = in_bytes(InstanceKlass::init_state_offset());
  3716   if (Immediate::is_uimm12(state_offset)) {
  3716   if (Immediate::is_uimm12(state_offset)) {
  3893   // Get superklass in klass and subklass in subklass.
  3893   // Get superklass in klass and subklass in subklass.
  3894   __ bind(quicked);
  3894   __ bind(quicked);
  3895 
  3895 
  3896   __ z_lgr(Z_ARG4, Z_tos);  // Save receiver.
  3896   __ z_lgr(Z_ARG4, Z_tos);  // Save receiver.
  3897   __ z_sllg(index, index, LogBytesPerWord);  // index2bytes for addressing
  3897   __ z_sllg(index, index, LogBytesPerWord);  // index2bytes for addressing
  3898   __ mem2reg_opt(klass, Address(cpool, index, sizeof(ConstantPool)));
  3898   __ load_resolved_klass_at_offset(cpool, index, klass);
  3899 
  3899 
  3900   __ bind(resolved);
  3900   __ bind(resolved);
  3901 
  3901 
  3902   __ load_klass(subklass, receiver);
  3902   __ load_klass(subklass, receiver);
  3903 
  3903 
  3967   // Get superklass in klass and subklass in subklass.
  3967   // Get superklass in klass and subklass in subklass.
  3968   __ bind(quicked);
  3968   __ bind(quicked);
  3969 
  3969 
  3970   __ load_klass(subklass, Z_tos);
  3970   __ load_klass(subklass, Z_tos);
  3971   __ z_sllg(index, index, LogBytesPerWord);  // index2bytes for addressing
  3971   __ z_sllg(index, index, LogBytesPerWord);  // index2bytes for addressing
  3972   __ mem2reg_opt(klass,
  3972   __ load_resolved_klass_at_offset(cpool, index, klass);
  3973                  Address(cpool, index, sizeof(ConstantPool)));
       
  3974 
  3973 
  3975   __ bind(resolved);
  3974   __ bind(resolved);
  3976 
  3975 
  3977   // Generate subtype check.
  3976   // Generate subtype check.
  3978   // Superklass in klass. Subklass in subklass.
  3977   // Superklass in klass. Subklass in subklass.