comparison src/cpu/x86/vm/c1_LIRAssembler_x86.cpp @ 12268:2795dff62b6c

8023542: Test java/io/File/CheckPermission.java fails due to unfinished recursion (java.lang.StackOverflowError) when JIT'ed code (-client,-server) is running Summary: Move null check before klass reference materialization in checkcast Reviewed-by: kvn, roland
author iveresov
date Wed, 18 Sep 2013 14:10:21 -0700
parents f98f5d48f511
children da051ce490eb
comparison
equal deleted inserted replaced
12267:04cbe2026912 12268:2795dff62b6c
1722 Rtmp1 = op->tmp3()->as_register(); 1722 Rtmp1 = op->tmp3()->as_register();
1723 select_different_registers(obj, dst, k_RInfo, klass_RInfo, Rtmp1); 1723 select_different_registers(obj, dst, k_RInfo, klass_RInfo, Rtmp1);
1724 } 1724 }
1725 1725
1726 assert_different_registers(obj, k_RInfo, klass_RInfo); 1726 assert_different_registers(obj, k_RInfo, klass_RInfo);
1727 if (!k->is_loaded()) {
1728 klass2reg_with_patching(k_RInfo, op->info_for_patch());
1729 } else {
1730 #ifdef _LP64
1731 __ mov_metadata(k_RInfo, k->constant_encoding());
1732 #endif // _LP64
1733 }
1734 assert(obj != k_RInfo, "must be different");
1735 1727
1736 __ cmpptr(obj, (int32_t)NULL_WORD); 1728 __ cmpptr(obj, (int32_t)NULL_WORD);
1737 if (op->should_profile()) { 1729 if (op->should_profile()) {
1738 Label not_null; 1730 Label not_null;
1739 __ jccb(Assembler::notEqual, not_null); 1731 __ jccb(Assembler::notEqual, not_null);
1745 __ orl(data_addr, header_bits); 1737 __ orl(data_addr, header_bits);
1746 __ jmp(*obj_is_null); 1738 __ jmp(*obj_is_null);
1747 __ bind(not_null); 1739 __ bind(not_null);
1748 } else { 1740 } else {
1749 __ jcc(Assembler::equal, *obj_is_null); 1741 __ jcc(Assembler::equal, *obj_is_null);
1742 }
1743
1744 if (!k->is_loaded()) {
1745 klass2reg_with_patching(k_RInfo, op->info_for_patch());
1746 } else {
1747 #ifdef _LP64
1748 __ mov_metadata(k_RInfo, k->constant_encoding());
1749 #endif // _LP64
1750 } 1750 }
1751 __ verify_oop(obj); 1751 __ verify_oop(obj);
1752 1752
1753 if (op->fast_check()) { 1753 if (op->fast_check()) {
1754 // get object class 1754 // get object class