--- old/src/share/vm/c1/c1_LIR.cpp 2015-08-12 14:09:12.000000000 +0200 +++ new/src/share/vm/c1/c1_LIR.cpp 2015-08-12 14:09:12.000000000 +0200 @@ -518,7 +518,6 @@ case lir_ffree: // input always valid, result and info always invalid case lir_push: // input always valid, result and info always invalid case lir_pop: // input always valid, result and info always invalid - case lir_return: // input always valid, result and info always invalid case lir_leal: // input and result always valid, info always invalid case lir_neg: // input and result always valid, info always invalid case lir_monaddr: // input and result always valid, info always invalid @@ -537,15 +536,31 @@ break; } + case lir_return: // input always valid, result and info always invalid + { + assert(op->as_Op1Safepoint() != NULL, "must be"); + LIR_Op1Safepoint* op_ret = (LIR_Op1Safepoint*)op; + + if (op_ret->_info) do_info(op_ret->_info); + if (op_ret->_opr->is_valid()) do_input(op_ret->_opr); + if (op_ret->_result->is_valid()) do_output(op_ret->_result); + + if (op_ret->tls_stub() != NULL) do_stub(op_ret->tls_stub()); + + break; + } + case lir_safepoint: { - assert(op->as_Op1() != NULL, "must be"); - LIR_Op1* op1 = (LIR_Op1*)op; + assert(op->as_Op1Safepoint() != NULL, "must be"); + LIR_Op1Safepoint* op1 = (LIR_Op1Safepoint*)op; assert(op1->_info != NULL, ""); do_info(op1->_info); if (op1->_opr->is_valid()) do_temp(op1->_opr); // safepoints on SPARC need temporary register assert(op1->_result->is_illegal(), "safepoint does not produce value"); + if (op1->tls_stub() != NULL) do_stub(op1->tls_stub()); + break; } @@ -1527,6 +1542,14 @@ append(new LIR_OpCompareAndSwap(lir_cas_int, addr, cmp_value, new_value, t1, t2, result)); } +// LIR_Op1Safepoint +LIR_Op1Safepoint::LIR_Op1Safepoint(LIR_Code code, LIR_Opr opr, CodeEmitInfo* info) + : LIR_Op1(code, opr, info) + , _tls_stub(NULL) { + if (ThreadLocalSafepoints) { + _tls_stub = new C1ThreadLocalSafepoint(code == lir_return); + } +} #ifdef PRODUCT