< prev index next >

src/cpu/s390/vm/c1_LIRGenerator_s390.cpp

Print this page
rev 12684 : [mq]: 8176580.patch

*** 1227,1239 **** bool is_updateBytes = (x->id() == vmIntrinsics::_updateBytesCRC32C); LIRItem crc(x->argument_at(0), this); LIRItem buf(x->argument_at(1), this); LIRItem off(x->argument_at(2), this); ! LIRItem len(x->argument_at(3), this); buf.load_item(); off.load_nonconstant(); LIR_Opr index = off.result(); int offset = is_updateBytes ? arrayOopDesc::base_offset_in_bytes(T_BYTE) : 0; if (off.result()->is_constant()) { index = LIR_OprFact::illegalOpr; --- 1227,1249 ---- bool is_updateBytes = (x->id() == vmIntrinsics::_updateBytesCRC32C); LIRItem crc(x->argument_at(0), this); LIRItem buf(x->argument_at(1), this); LIRItem off(x->argument_at(2), this); ! LIRItem end(x->argument_at(3), this); buf.load_item(); off.load_nonconstant(); + end.load_nonconstant(); + + // len = end - off + LIR_Opr len = end.result(); + LIR_Opr tmpA = new_register(T_INT); + LIR_Opr tmpB = new_register(T_INT); + __ move(end.result(), tmpA); + __ move(off.result(), tmpB); + __ sub(tmpA, tmpB, tmpA); + len = tmpA; LIR_Opr index = off.result(); int offset = is_updateBytes ? arrayOopDesc::base_offset_in_bytes(T_BYTE) : 0; if (off.result()->is_constant()) { index = LIR_OprFact::illegalOpr;
*** 1260,1270 **** LIR_Opr arg2 = cc->at(1); LIR_Opr arg3 = cc->at(2); crc.load_item_force(arg1); // We skip int->long conversion here, because CRC32C stub doesn't care about high bits. __ leal(LIR_OprFact::address(a), arg2); ! len.load_item_force(arg3); // We skip int->long conversion here, because CRC32C stub expects int. __ call_runtime_leaf(StubRoutines::updateBytesCRC32C(), LIR_OprFact::illegalOpr, result_reg, cc->args()); __ move(result_reg, result); break; } --- 1270,1280 ---- LIR_Opr arg2 = cc->at(1); LIR_Opr arg3 = cc->at(2); crc.load_item_force(arg1); // We skip int->long conversion here, because CRC32C stub doesn't care about high bits. __ leal(LIR_OprFact::address(a), arg2); ! __ move(len, cc->at(2)); // We skip int->long conversion here, because CRC32C stub expects int. __ call_runtime_leaf(StubRoutines::updateBytesCRC32C(), LIR_OprFact::illegalOpr, result_reg, cc->args()); __ move(result_reg, result); break; }
< prev index next >