Mercurial > hg > truffle
comparison src/cpu/x86/vm/c1_LIRGenerator_x86.cpp @ 1060:323bd24c6520
6769124: various 64-bit fixes for c1
Reviewed-by: never
author | roland |
---|---|
date | Mon, 02 Nov 2009 11:17:55 +0100 |
parents | a1423fe86a18 |
children | c18cbe5936b8 87fc6aca31ab |
comparison
equal
deleted
inserted
replaced
1059:389049f3f393 | 1060:323bd24c6520 |
---|---|
753 } else { | 753 } else { |
754 ShouldNotReachHere(); | 754 ShouldNotReachHere(); |
755 } | 755 } |
756 | 756 |
757 LIR_Opr addr = new_pointer_register(); | 757 LIR_Opr addr = new_pointer_register(); |
758 __ move(obj.result(), addr); | 758 LIR_Address* a; |
759 __ add(addr, offset.result(), addr); | 759 if(offset.result()->is_constant()) { |
760 a = new LIR_Address(obj.result(), | |
761 NOT_LP64(offset.result()->as_constant_ptr()->as_jint()) LP64_ONLY((int)offset.result()->as_constant_ptr()->as_jlong()), | |
762 as_BasicType(type)); | |
763 } else { | |
764 a = new LIR_Address(obj.result(), | |
765 offset.result(), | |
766 LIR_Address::times_1, | |
767 0, | |
768 as_BasicType(type)); | |
769 } | |
770 __ leal(LIR_OprFact::address(a), addr); | |
760 | 771 |
761 if (type == objectType) { // Write-barrier needed for Object fields. | 772 if (type == objectType) { // Write-barrier needed for Object fields. |
762 // Do the pre-write barrier, if any. | 773 // Do the pre-write barrier, if any. |
763 pre_barrier(addr, false, NULL); | 774 pre_barrier(addr, false, NULL); |
764 } | 775 } |