Mercurial > hg > truffle
comparison src/cpu/x86/vm/c1_LIRAssembler_x86.cpp @ 29:d5fc211aea19
6633953: type2aelembytes{T_ADDRESS} should be 8 bytes in 64 bit VM
Summary: T_ADDRESS size is defined as 'int' size (4 bytes) but C2 use it for raw pointers and as memory type for StoreP and LoadP nodes.
Reviewed-by: jrose
author | kvn |
---|---|
date | Mon, 25 Feb 2008 15:05:44 -0800 |
parents | a61af66fc99e |
children | d1605aabd0a1 |
comparison
equal
deleted
inserted
replaced
28:67914967a4b5 | 29:d5fc211aea19 |
---|---|
544 __ jcc(Assembler::zero, noLoop); | 544 __ jcc(Assembler::zero, noLoop); |
545 | 545 |
546 // set rsi.edi to the end of the arrays (arrays have same length) | 546 // set rsi.edi to the end of the arrays (arrays have same length) |
547 // negate the index | 547 // negate the index |
548 | 548 |
549 __ leal(rsi, Address(rsi, rax, Address::times_2, type2aelembytes[T_CHAR])); | 549 __ leal(rsi, Address(rsi, rax, Address::times_2, type2aelembytes(T_CHAR))); |
550 __ leal(rdi, Address(rdi, rax, Address::times_2, type2aelembytes[T_CHAR])); | 550 __ leal(rdi, Address(rdi, rax, Address::times_2, type2aelembytes(T_CHAR))); |
551 __ negl(rax); | 551 __ negl(rax); |
552 | 552 |
553 // compare the strings in a loop | 553 // compare the strings in a loop |
554 | 554 |
555 Label loop; | 555 Label loop; |
1230 } | 1230 } |
1231 | 1231 |
1232 | 1232 |
1233 NEEDS_CLEANUP; // This could be static? | 1233 NEEDS_CLEANUP; // This could be static? |
1234 Address::ScaleFactor LIR_Assembler::array_element_size(BasicType type) const { | 1234 Address::ScaleFactor LIR_Assembler::array_element_size(BasicType type) const { |
1235 int elem_size = type2aelembytes[type]; | 1235 int elem_size = type2aelembytes(type); |
1236 switch (elem_size) { | 1236 switch (elem_size) { |
1237 case 1: return Address::times_1; | 1237 case 1: return Address::times_1; |
1238 case 2: return Address::times_2; | 1238 case 2: return Address::times_2; |
1239 case 4: return Address::times_4; | 1239 case 4: return Address::times_4; |
1240 case 8: return Address::times_8; | 1240 case 8: return Address::times_8; |
2737 return; | 2737 return; |
2738 } | 2738 } |
2739 | 2739 |
2740 assert(default_type != NULL && default_type->is_array_klass() && default_type->is_loaded(), "must be true at this point"); | 2740 assert(default_type != NULL && default_type->is_array_klass() && default_type->is_loaded(), "must be true at this point"); |
2741 | 2741 |
2742 int elem_size = type2aelembytes[basic_type]; | 2742 int elem_size = type2aelembytes(basic_type); |
2743 int shift_amount; | 2743 int shift_amount; |
2744 Address::ScaleFactor scale; | 2744 Address::ScaleFactor scale; |
2745 | 2745 |
2746 switch (elem_size) { | 2746 switch (elem_size) { |
2747 case 1 : | 2747 case 1 : |