src/share/vm/c1/c1_LIRGenerator.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8161720 Cdiff src/share/vm/c1/c1_LIRGenerator.cpp

src/share/vm/c1/c1_LIRGenerator.cpp

Print this page

        

*** 2408,2417 **** --- 2408,2426 ---- } } #endif // INCLUDE_ALL_GCS if (x->is_volatile() && os::is_MP()) __ membar_acquire(); + + /* Normalize boolean value returned by unsafe operation, i.e., value != 0 ? value = true : value false. */ + if (type == T_BOOLEAN) { + LabelObj* equalZeroLabel = new LabelObj(); + __ cmp(lir_cond_equal, value, 0); + __ branch(lir_cond_equal, T_BOOLEAN, equalZeroLabel->label()); + __ move(LIR_OprFact::intConst(1), value); + __ branch_destination(equalZeroLabel->label()); + } } void LIRGenerator::do_UnsafePutObject(UnsafePutObject* x) { BasicType type = x->basic_type();
src/share/vm/c1/c1_LIRGenerator.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File