3680 case lir_membar_storeload : __ membar_storeload(); break; |
3680 case lir_membar_storeload : __ membar_storeload(); break; |
3681 default : ShouldNotReachHere(); break; |
3681 default : ShouldNotReachHere(); break; |
3682 } |
3682 } |
3683 } |
3683 } |
3684 } |
3684 } |
|
3685 |
|
3686 LIR_Opr LIRGenerator::maybe_mask_boolean(StoreIndexed* x, LIR_Opr array, LIR_Opr value, CodeEmitInfo*& null_check_info) { |
|
3687 if (x->check_boolean()) { |
|
3688 LIR_Opr value_fixed = rlock_byte(T_BYTE); |
|
3689 if (TwoOperandLIRForm) { |
|
3690 __ move(value, value_fixed); |
|
3691 __ logical_and(value_fixed, LIR_OprFact::intConst(1), value_fixed); |
|
3692 } else { |
|
3693 __ logical_and(value, LIR_OprFact::intConst(1), value_fixed); |
|
3694 } |
|
3695 LIR_Opr klass = new_register(T_METADATA); |
|
3696 __ move(new LIR_Address(array, oopDesc::klass_offset_in_bytes(), T_ADDRESS), klass, null_check_info); |
|
3697 null_check_info = NULL; |
|
3698 LIR_Opr layout = new_register(T_INT); |
|
3699 __ move(new LIR_Address(klass, in_bytes(Klass::layout_helper_offset()), T_INT), layout); |
|
3700 int diffbit = Klass::layout_helper_boolean_diffbit(); |
|
3701 __ logical_and(layout, LIR_OprFact::intConst(diffbit), layout); |
|
3702 __ cmp(lir_cond_notEqual, layout, LIR_OprFact::intConst(0)); |
|
3703 __ cmove(lir_cond_notEqual, value_fixed, value, value_fixed, T_BYTE); |
|
3704 value = value_fixed; |
|
3705 } |
|
3706 return value; |
|
3707 } |