Mercurial > hg > jdk9-shenandoah > hotspot
changeset 9760:42defc20a38c
More cleanup in C1 code.
author | rkennke |
---|---|
date | Thu, 01 Oct 2015 12:58:23 +0200 |
parents | b2c1cf8bd981 |
children | 0d5b3847ab03 |
files | src/cpu/x86/vm/c1_LIRGenerator_x86.cpp src/share/vm/c1/c1_LIRGenerator.cpp |
diffstat | 2 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp Thu Oct 01 12:22:20 2015 +0200 +++ b/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp Thu Oct 01 12:58:23 2015 +0200 @@ -306,8 +306,9 @@ if (obj_store && UseShenandoahGC) { if (! val->is_register()) { assert(val->is_constant(), "expect constant"); + } else { + val = shenandoah_read_barrier(val, NULL, true); } - val = shenandoah_read_barrier(val, NULL, true); } // emit array address setup early so it schedules better
--- a/src/share/vm/c1/c1_LIRGenerator.cpp Thu Oct 01 12:22:20 2015 +0200 +++ b/src/share/vm/c1/c1_LIRGenerator.cpp Thu Oct 01 12:58:23 2015 +0200 @@ -1435,7 +1435,6 @@ case BarrierSet::ShenandoahBarrierSet: G1SATBCardTableModRef_pre_barrier(addr_opr, pre_val, do_load, patch, info); break; - #endif // INCLUDE_ALL_GCS case BarrierSet::CardTableForRS: case BarrierSet::CardTableExtension: @@ -1739,13 +1738,12 @@ obj = shenandoah_write_barrier(obj, info, x->needs_null_check()); LIR_Opr val = value.result(); - if (is_oop) { + if (is_oop && UseShenandoahGC) { if (! val->is_register()) { - LIR_Opr tmp = new_register(T_OBJECT); - __ move(val, tmp); - val = tmp; + assert(val->is_constant(), "expect constant"); + } else { + val = shenandoah_read_barrier(val, NULL, true); } - val = shenandoah_read_barrier(val, NULL, true); } LIR_Address* address; @@ -1819,6 +1817,7 @@ x->is_static() ? "static" : "field", x->printable_bci()); } #endif + LIR_Opr obj = object.result(); bool stress_deopt = StressLoopInvariantCodeMotion && info && info->deoptimize_on_exception(); if (x->needs_null_check() &&