Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/c1_LIRAssembler_x86.cpp @ 17831:876390ee9b6f
8039043: Implicit null check is in the wrong place in C1 -UseCompressedOops
Summary: Null check is placed in a wrong place when storing a null to an object field on x64 with compressed oops off
Reviewed-by: roland, vlivanov, kvn
author | iveresov |
---|---|
date | Wed, 02 Apr 2014 11:24:51 -0700 |
parents | 12ad8db39f76 |
children | 0bf37f737702 |
comparison
equal
deleted
inserted
replaced
17829:0118c8c7b80f | 17831:876390ee9b6f |
---|---|
799 case T_ARRAY: | 799 case T_ARRAY: |
800 if (c->as_jobject() == NULL) { | 800 if (c->as_jobject() == NULL) { |
801 if (UseCompressedOops && !wide) { | 801 if (UseCompressedOops && !wide) { |
802 __ movl(as_Address(addr), (int32_t)NULL_WORD); | 802 __ movl(as_Address(addr), (int32_t)NULL_WORD); |
803 } else { | 803 } else { |
804 #ifdef _LP64 | |
805 __ xorptr(rscratch1, rscratch1); | |
806 null_check_here = code_offset(); | |
807 __ movptr(as_Address(addr), rscratch1); | |
808 #else | |
804 __ movptr(as_Address(addr), NULL_WORD); | 809 __ movptr(as_Address(addr), NULL_WORD); |
810 #endif | |
805 } | 811 } |
806 } else { | 812 } else { |
807 if (is_literal_address(addr)) { | 813 if (is_literal_address(addr)) { |
808 ShouldNotReachHere(); | 814 ShouldNotReachHere(); |
809 __ movoop(as_Address(addr, noreg), c->as_jobject()); | 815 __ movoop(as_Address(addr, noreg), c->as_jobject()); |