< prev index next >
src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp
Print this page
rev 51408 : [mq]: cleanup-c1.patch
*** 294,310 ****
info_for_exception = state_for(x);
}
// this CodeEmitInfo must not have the xhandlers because here the
// object is already locked (xhandlers expect object to be unlocked)
CodeEmitInfo* info = state_for(x, x->state(), true);
! LIR_Opr obj_opr = obj.result();
! DecoratorSet decorators = IN_HEAP;
! if (!x->needs_null_check()) {
! decorators |= IS_NOT_NULL;
! }
! obj_opr = access_resolve_for_write(decorators, obj_opr, state_for(x));
! monitor_enter(obj_opr, lock, syncTempOpr(), scratch,
x->monitor_no(), info_for_exception, info);
}
void LIRGenerator::do_MonitorExit(MonitorExit* x) {
--- 294,304 ----
info_for_exception = state_for(x);
}
// this CodeEmitInfo must not have the xhandlers because here the
// object is already locked (xhandlers expect object to be unlocked)
CodeEmitInfo* info = state_for(x, x->state(), true);
! monitor_enter(obj.result(), lock, syncTempOpr(), scratch,
x->monitor_no(), info_for_exception, info);
}
void LIRGenerator::do_MonitorExit(MonitorExit* x) {
*** 915,947 ****
LIRItem src_pos(x->argument_at(1), this);
LIRItem dst(x->argument_at(2), this);
LIRItem dst_pos(x->argument_at(3), this);
LIRItem length(x->argument_at(4), this);
- dst.load_item();
- LIR_Opr dst_op = dst.result();
- DecoratorSet decorators = IN_HEAP;
- if (!x->arg_needs_null_check(2)) {
- decorators |= IS_NOT_NULL;
- }
- dst_op = access_resolve_for_write(decorators, dst_op, info);
- src.load_item();
- LIR_Opr src_op = src.result();
- decorators = IN_HEAP;
- if (!x->arg_needs_null_check(0)) {
- decorators |= IS_NOT_NULL;
- }
- src_op = access_resolve_for_read(decorators, src_op, info);
-
// operands for arraycopy must use fixed registers, otherwise
// LinearScan will fail allocation (because arraycopy always needs a
// call)
#ifndef _LP64
! src_op = force_opr_to(src_op, FrameMap::rcx_oop_opr);
src_pos.load_item_force (FrameMap::rdx_opr);
! dst_op = force_opr_to(dst_op, FrameMap::rax_oop_opr);
dst_pos.load_item_force (FrameMap::rbx_opr);
length.load_item_force (FrameMap::rdi_opr);
LIR_Opr tmp = (FrameMap::rsi_opr);
#else
--- 909,926 ----
LIRItem src_pos(x->argument_at(1), this);
LIRItem dst(x->argument_at(2), this);
LIRItem dst_pos(x->argument_at(3), this);
LIRItem length(x->argument_at(4), this);
// operands for arraycopy must use fixed registers, otherwise
// LinearScan will fail allocation (because arraycopy always needs a
// call)
#ifndef _LP64
! src.load_item_force (FrameMap::rcx_oop_opr);
src_pos.load_item_force (FrameMap::rdx_opr);
! dst.load_item_force (FrameMap::rax_oop_opr);
dst_pos.load_item_force (FrameMap::rbx_opr);
length.load_item_force (FrameMap::rdi_opr);
LIR_Opr tmp = (FrameMap::rsi_opr);
#else
*** 951,963 ****
// positions are not similar enough to pick one as the best.
// Also because the java calling convention is a "shifted" version
// of the C convention we can process the java args trivially into C
// args without worry of overwriting during the xfer
! src_op = force_opr_to(src_op, FrameMap::as_oop_opr(j_rarg0));
src_pos.load_item_force (FrameMap::as_opr(j_rarg1));
! dst_op = force_opr_to(dst_op, FrameMap::as_oop_opr(j_rarg2));
dst_pos.load_item_force (FrameMap::as_opr(j_rarg3));
length.load_item_force (FrameMap::as_opr(j_rarg4));
LIR_Opr tmp = FrameMap::as_opr(j_rarg5);
#endif // LP64
--- 930,942 ----
// positions are not similar enough to pick one as the best.
// Also because the java calling convention is a "shifted" version
// of the C convention we can process the java args trivially into C
// args without worry of overwriting during the xfer
! src.load_item_force (FrameMap::as_oop_opr(j_rarg0));
src_pos.load_item_force (FrameMap::as_opr(j_rarg1));
! dst.load_item_force (FrameMap::as_oop_opr(j_rarg2));
dst_pos.load_item_force (FrameMap::as_opr(j_rarg3));
length.load_item_force (FrameMap::as_opr(j_rarg4));
LIR_Opr tmp = FrameMap::as_opr(j_rarg5);
#endif // LP64
*** 966,976 ****
int flags;
ciArrayKlass* expected_type;
arraycopy_helper(x, &flags, &expected_type);
! __ arraycopy(src_op, src_pos.result(), dst_op, dst_pos.result(), length.result(), tmp, expected_type, flags, info); // does add_safepoint
}
void LIRGenerator::do_update_CRC32(Intrinsic* x) {
assert(UseCRC32Intrinsics, "need AVX and LCMUL instructions support");
// Make all state_for calls early since they can emit code
--- 945,955 ----
int flags;
ciArrayKlass* expected_type;
arraycopy_helper(x, &flags, &expected_type);
! __ arraycopy(src.result(), src_pos.result(), dst.result(), dst_pos.result(), length.result(), tmp, expected_type, flags, info); // does add_safepoint
}
void LIRGenerator::do_update_CRC32(Intrinsic* x) {
assert(UseCRC32Intrinsics, "need AVX and LCMUL instructions support");
// Make all state_for calls early since they can emit code
*** 1078,1098 ****
LIR_Opr result_aOffset = aOffset.result();
if (result_aOffset->is_constant()) {
constant_aOffset = result_aOffset->as_jlong();
result_aOffset = LIR_OprFact::illegalOpr;
}
! LIR_Opr result_a = a.result();
! result_a = access_resolve_for_read(IN_HEAP, result_a, NULL);
long constant_bOffset = 0;
LIR_Opr result_bOffset = bOffset.result();
if (result_bOffset->is_constant()) {
constant_bOffset = result_bOffset->as_jlong();
result_bOffset = LIR_OprFact::illegalOpr;
}
! LIR_Opr result_b = b.result();
! result_b = access_resolve_for_read(IN_HEAP, result_b, NULL);
#ifndef _LP64
result_a = new_register(T_INT);
__ convert(Bytecodes::_l2i, a.result(), result_a);
result_b = new_register(T_INT);
--- 1057,1075 ----
LIR_Opr result_aOffset = aOffset.result();
if (result_aOffset->is_constant()) {
constant_aOffset = result_aOffset->as_jlong();
result_aOffset = LIR_OprFact::illegalOpr;
}
! LIR_Opr result_a = access_resolve_for_read(IN_HEAP, a.result(), NULL);
long constant_bOffset = 0;
LIR_Opr result_bOffset = bOffset.result();
if (result_bOffset->is_constant()) {
constant_bOffset = result_bOffset->as_jlong();
result_bOffset = LIR_OprFact::illegalOpr;
}
! LIR_Opr result_b = access_resolve_for_read(IN_HEAP, b.result(), NULL);
#ifndef _LP64
result_a = new_register(T_INT);
__ convert(Bytecodes::_l2i, a.result(), result_a);
result_b = new_register(T_INT);
< prev index next >