Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/stubGenerator_x86_32.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 | f08d439fab8c |
children | 22cee0ee8927 |
comparison
equal
deleted
inserted
replaced
4761:65149e74c706 | 4762:069ab3f976d3 |
---|---|
1372 // one less register, because needed values are on the argument stack. | 1372 // one less register, because needed values are on the argument stack. |
1373 // __ check_klass_subtype_fast_path(sub_klass, *super_klass*, temp, | 1373 // __ check_klass_subtype_fast_path(sub_klass, *super_klass*, temp, |
1374 // L_success, L_failure, NULL); | 1374 // L_success, L_failure, NULL); |
1375 assert_different_registers(sub_klass, temp); | 1375 assert_different_registers(sub_klass, temp); |
1376 | 1376 |
1377 int sc_offset = (klassOopDesc::header_size() * HeapWordSize + | 1377 int sc_offset = in_bytes(Klass::secondary_super_cache_offset()); |
1378 Klass::secondary_super_cache_offset_in_bytes()); | |
1379 | 1378 |
1380 // if the pointers are equal, we are done (e.g., String[] elements) | 1379 // if the pointers are equal, we are done (e.g., String[] elements) |
1381 __ cmpptr(sub_klass, super_klass_addr); | 1380 __ cmpptr(sub_klass, super_klass_addr); |
1382 LOCAL_JCC(Assembler::equal, L_success); | 1381 LOCAL_JCC(Assembler::equal, L_success); |
1383 | 1382 |
1785 // 32 30 24 16 8 2 0 | 1784 // 32 30 24 16 8 2 0 |
1786 // | 1785 // |
1787 // array_tag: typeArray = 0x3, objArray = 0x2, non-array = 0x0 | 1786 // array_tag: typeArray = 0x3, objArray = 0x2, non-array = 0x0 |
1788 // | 1787 // |
1789 | 1788 |
1790 int lh_offset = klassOopDesc::header_size() * HeapWordSize + | 1789 int lh_offset = in_bytes(Klass::layout_helper_offset()); |
1791 Klass::layout_helper_offset_in_bytes(); | |
1792 Address src_klass_lh_addr(rcx_src_klass, lh_offset); | 1790 Address src_klass_lh_addr(rcx_src_klass, lh_offset); |
1793 | 1791 |
1794 // Handle objArrays completely differently... | 1792 // Handle objArrays completely differently... |
1795 jint objArray_lh = Klass::array_layout_helper(T_OBJECT); | 1793 jint objArray_lh = Klass::array_layout_helper(T_OBJECT); |
1796 __ cmpl(src_klass_lh_addr, objArray_lh); | 1794 __ cmpl(src_klass_lh_addr, objArray_lh); |
1912 | 1910 |
1913 __ BIND(L_checkcast_copy); | 1911 __ BIND(L_checkcast_copy); |
1914 // live at this point: rcx_src_klass, dst[_pos], src[_pos] | 1912 // live at this point: rcx_src_klass, dst[_pos], src[_pos] |
1915 { | 1913 { |
1916 // Handy offsets: | 1914 // Handy offsets: |
1917 int ek_offset = (klassOopDesc::header_size() * HeapWordSize + | 1915 int ek_offset = in_bytes(objArrayKlass::element_klass_offset()); |
1918 objArrayKlass::element_klass_offset_in_bytes()); | 1916 int sco_offset = in_bytes(Klass::super_check_offset_offset()); |
1919 int sco_offset = (klassOopDesc::header_size() * HeapWordSize + | |
1920 Klass::super_check_offset_offset_in_bytes()); | |
1921 | 1917 |
1922 Register rsi_dst_klass = rsi; | 1918 Register rsi_dst_klass = rsi; |
1923 Register rdi_temp = rdi; | 1919 Register rdi_temp = rdi; |
1924 assert(rsi_dst_klass == src_pos, "expected alias w/ src_pos"); | 1920 assert(rsi_dst_klass == src_pos, "expected alias w/ src_pos"); |
1925 assert(rdi_temp == dst_pos, "expected alias w/ dst_pos"); | 1921 assert(rdi_temp == dst_pos, "expected alias w/ dst_pos"); |