Mercurial > hg > truffle
comparison src/cpu/sparc/vm/stubGenerator_sparc.cpp @ 4762:069ab3f976d3
7118863: Move sizeof(klassOopDesc) into the *Klass::*_offset_in_bytes() functions
Summary: Moved sizeof(klassOopDesc), changed the return type to ByteSize and removed the _in_bytes suffix.
Reviewed-by: never, bdelsart, coleenp, jrose
author | stefank |
---|---|
date | Wed, 07 Dec 2011 11:35:03 +0100 |
parents | a92cdbac8b9e |
children | 22cee0ee8927 |
comparison
equal
deleted
inserted
replaced
4761:65149e74c706 | 4762:069ab3f976d3 |
---|---|
3044 // 32 30 24 16 8 2 0 | 3044 // 32 30 24 16 8 2 0 |
3045 // | 3045 // |
3046 // array_tag: typeArray = 0x3, objArray = 0x2, non-array = 0x0 | 3046 // array_tag: typeArray = 0x3, objArray = 0x2, non-array = 0x0 |
3047 // | 3047 // |
3048 | 3048 |
3049 int lh_offset = klassOopDesc::header_size() * HeapWordSize + | 3049 int lh_offset = in_bytes(Klass::layout_helper_offset()); |
3050 Klass::layout_helper_offset_in_bytes(); | |
3051 | 3050 |
3052 // Load 32-bits signed value. Use br() instruction with it to check icc. | 3051 // Load 32-bits signed value. Use br() instruction with it to check icc. |
3053 __ lduw(G3_src_klass, lh_offset, G5_lh); | 3052 __ lduw(G3_src_klass, lh_offset, G5_lh); |
3054 | 3053 |
3055 if (UseCompressedOops) { | 3054 if (UseCompressedOops) { |
3192 Register sco_temp = O3; // this register is free now | 3191 Register sco_temp = O3; // this register is free now |
3193 assert_different_registers(from, to, count, sco_temp, | 3192 assert_different_registers(from, to, count, sco_temp, |
3194 G4_dst_klass, G3_src_klass); | 3193 G4_dst_klass, G3_src_klass); |
3195 | 3194 |
3196 // Generate the type check. | 3195 // Generate the type check. |
3197 int sco_offset = (klassOopDesc::header_size() * HeapWordSize + | 3196 int sco_offset = in_bytes(Klass::super_check_offset_offset()); |
3198 Klass::super_check_offset_offset_in_bytes()); | |
3199 __ lduw(G4_dst_klass, sco_offset, sco_temp); | 3197 __ lduw(G4_dst_klass, sco_offset, sco_temp); |
3200 generate_type_check(G3_src_klass, sco_temp, G4_dst_klass, | 3198 generate_type_check(G3_src_klass, sco_temp, G4_dst_klass, |
3201 O5_temp, L_plain_copy); | 3199 O5_temp, L_plain_copy); |
3202 | 3200 |
3203 // Fetch destination element klass from the objArrayKlass header. | 3201 // Fetch destination element klass from the objArrayKlass header. |
3204 int ek_offset = (klassOopDesc::header_size() * HeapWordSize + | 3202 int ek_offset = in_bytes(objArrayKlass::element_klass_offset()); |
3205 objArrayKlass::element_klass_offset_in_bytes()); | |
3206 | 3203 |
3207 // the checkcast_copy loop needs two extra arguments: | 3204 // the checkcast_copy loop needs two extra arguments: |
3208 __ ld_ptr(G4_dst_klass, ek_offset, O4); // dest elem klass | 3205 __ ld_ptr(G4_dst_klass, ek_offset, O4); // dest elem klass |
3209 // lduw(O4, sco_offset, O3); // sco of elem klass | 3206 // lduw(O4, sco_offset, O3); // sco of elem klass |
3210 | 3207 |