Mercurial > hg > truffle
comparison src/cpu/x86/vm/stubGenerator_x86_64.cpp @ 4771:22cee0ee8927
Merge
author | kvn |
---|---|
date | Fri, 06 Jan 2012 20:09:20 -0800 |
parents | dca455dea3a7 069ab3f976d3 |
children | c742b0b47fe5 |
comparison
equal
deleted
inserted
replaced
4755:2b3acb34791f | 4771:22cee0ee8927 |
---|---|
2259 #ifdef ASSERT | 2259 #ifdef ASSERT |
2260 BLOCK_COMMENT("assert consistent ckoff/ckval"); | 2260 BLOCK_COMMENT("assert consistent ckoff/ckval"); |
2261 // The ckoff and ckval must be mutually consistent, | 2261 // The ckoff and ckval must be mutually consistent, |
2262 // even though caller generates both. | 2262 // even though caller generates both. |
2263 { Label L; | 2263 { Label L; |
2264 int sco_offset = (klassOopDesc::header_size() * HeapWordSize + | 2264 int sco_offset = in_bytes(Klass::super_check_offset_offset()); |
2265 Klass::super_check_offset_offset_in_bytes()); | |
2266 __ cmpl(ckoff, Address(ckval, sco_offset)); | 2265 __ cmpl(ckoff, Address(ckval, sco_offset)); |
2267 __ jcc(Assembler::equal, L); | 2266 __ jcc(Assembler::equal, L); |
2268 __ stop("super_check_offset inconsistent"); | 2267 __ stop("super_check_offset inconsistent"); |
2269 __ bind(L); | 2268 __ bind(L); |
2270 } | 2269 } |
2570 // 32 30 24 16 8 2 0 | 2569 // 32 30 24 16 8 2 0 |
2571 // | 2570 // |
2572 // array_tag: typeArray = 0x3, objArray = 0x2, non-array = 0x0 | 2571 // array_tag: typeArray = 0x3, objArray = 0x2, non-array = 0x0 |
2573 // | 2572 // |
2574 | 2573 |
2575 const int lh_offset = klassOopDesc::header_size() * HeapWordSize + | 2574 const int lh_offset = in_bytes(Klass::layout_helper_offset()); |
2576 Klass::layout_helper_offset_in_bytes(); | |
2577 | 2575 |
2578 // Handle objArrays completely differently... | 2576 // Handle objArrays completely differently... |
2579 const jint objArray_lh = Klass::array_layout_helper(T_OBJECT); | 2577 const jint objArray_lh = Klass::array_layout_helper(T_OBJECT); |
2580 __ cmpl(Address(r10_src_klass, lh_offset), objArray_lh); | 2578 __ cmpl(Address(r10_src_klass, lh_offset), objArray_lh); |
2581 __ jcc(Assembler::equal, L_objArray); | 2579 __ jcc(Assembler::equal, L_objArray); |
2720 assert_different_registers(from, to, count, sco_temp, | 2718 assert_different_registers(from, to, count, sco_temp, |
2721 r11_dst_klass, r10_src_klass); | 2719 r11_dst_klass, r10_src_klass); |
2722 assert_clean_int(count, sco_temp); | 2720 assert_clean_int(count, sco_temp); |
2723 | 2721 |
2724 // Generate the type check. | 2722 // Generate the type check. |
2725 const int sco_offset = (klassOopDesc::header_size() * HeapWordSize + | 2723 const int sco_offset = in_bytes(Klass::super_check_offset_offset()); |
2726 Klass::super_check_offset_offset_in_bytes()); | |
2727 __ movl(sco_temp, Address(r11_dst_klass, sco_offset)); | 2724 __ movl(sco_temp, Address(r11_dst_klass, sco_offset)); |
2728 assert_clean_int(sco_temp, rax); | 2725 assert_clean_int(sco_temp, rax); |
2729 generate_type_check(r10_src_klass, sco_temp, r11_dst_klass, L_plain_copy); | 2726 generate_type_check(r10_src_klass, sco_temp, r11_dst_klass, L_plain_copy); |
2730 | 2727 |
2731 // Fetch destination element klass from the objArrayKlass header. | 2728 // Fetch destination element klass from the objArrayKlass header. |
2732 int ek_offset = (klassOopDesc::header_size() * HeapWordSize + | 2729 int ek_offset = in_bytes(objArrayKlass::element_klass_offset()); |
2733 objArrayKlass::element_klass_offset_in_bytes()); | |
2734 __ movptr(r11_dst_klass, Address(r11_dst_klass, ek_offset)); | 2730 __ movptr(r11_dst_klass, Address(r11_dst_klass, ek_offset)); |
2735 __ movl( sco_temp, Address(r11_dst_klass, sco_offset)); | 2731 __ movl( sco_temp, Address(r11_dst_klass, sco_offset)); |
2736 assert_clean_int(sco_temp, rax); | 2732 assert_clean_int(sco_temp, rax); |
2737 | 2733 |
2738 // the checkcast_copy loop needs two extra arguments: | 2734 // the checkcast_copy loop needs two extra arguments: |