1110 |
1110 |
1111 void LIRGenerator::do_update_CRC32C(Intrinsic* x) { |
1111 void LIRGenerator::do_update_CRC32C(Intrinsic* x) { |
1112 Unimplemented(); |
1112 Unimplemented(); |
1113 } |
1113 } |
1114 |
1114 |
|
1115 void LIRGenerator::do_vectorizedMismatch(Intrinsic* x) { |
|
1116 assert(UseVectorizedMismatchIntrinsic, "need AVX instruction support"); |
|
1117 |
|
1118 // Make all state_for calls early since they can emit code |
|
1119 LIR_Opr result = rlock_result(x); |
|
1120 |
|
1121 LIRItem a(x->argument_at(0), this); // Object |
|
1122 LIRItem aOffset(x->argument_at(1), this); // long |
|
1123 LIRItem b(x->argument_at(2), this); // Object |
|
1124 LIRItem bOffset(x->argument_at(3), this); // long |
|
1125 LIRItem length(x->argument_at(4), this); // int |
|
1126 LIRItem log2ArrayIndexScale(x->argument_at(5), this); // int |
|
1127 |
|
1128 a.load_item(); |
|
1129 aOffset.load_nonconstant(); |
|
1130 b.load_item(); |
|
1131 bOffset.load_nonconstant(); |
|
1132 |
|
1133 long constant_aOffset = 0; |
|
1134 LIR_Opr result_aOffset = aOffset.result(); |
|
1135 if (result_aOffset->is_constant()) { |
|
1136 constant_aOffset = result_aOffset->as_jlong(); |
|
1137 result_aOffset = LIR_OprFact::illegalOpr; |
|
1138 } |
|
1139 LIR_Opr result_a = a.result(); |
|
1140 |
|
1141 long constant_bOffset = 0; |
|
1142 LIR_Opr result_bOffset = bOffset.result(); |
|
1143 if (result_bOffset->is_constant()) { |
|
1144 constant_bOffset = result_bOffset->as_jlong(); |
|
1145 result_bOffset = LIR_OprFact::illegalOpr; |
|
1146 } |
|
1147 LIR_Opr result_b = b.result(); |
|
1148 |
|
1149 #ifndef _LP64 |
|
1150 result_a = new_register(T_INT); |
|
1151 __ convert(Bytecodes::_l2i, a.result(), result_a); |
|
1152 result_b = new_register(T_INT); |
|
1153 __ convert(Bytecodes::_l2i, b.result(), result_b); |
|
1154 #endif |
|
1155 |
|
1156 |
|
1157 LIR_Address* addr_a = new LIR_Address(result_a, |
|
1158 result_aOffset, |
|
1159 LIR_Address::times_1, |
|
1160 constant_aOffset, |
|
1161 T_BYTE); |
|
1162 |
|
1163 LIR_Address* addr_b = new LIR_Address(result_b, |
|
1164 result_bOffset, |
|
1165 LIR_Address::times_1, |
|
1166 constant_bOffset, |
|
1167 T_BYTE); |
|
1168 |
|
1169 BasicTypeList signature(4); |
|
1170 signature.append(T_ADDRESS); |
|
1171 signature.append(T_ADDRESS); |
|
1172 signature.append(T_INT); |
|
1173 signature.append(T_INT); |
|
1174 CallingConvention* cc = frame_map()->c_calling_convention(&signature); |
|
1175 const LIR_Opr result_reg = result_register_for(x->type()); |
|
1176 |
|
1177 LIR_Opr ptr_addr_a = new_pointer_register(); |
|
1178 __ leal(LIR_OprFact::address(addr_a), ptr_addr_a); |
|
1179 |
|
1180 LIR_Opr ptr_addr_b = new_pointer_register(); |
|
1181 __ leal(LIR_OprFact::address(addr_b), ptr_addr_b); |
|
1182 |
|
1183 __ move(ptr_addr_a, cc->at(0)); |
|
1184 __ move(ptr_addr_b, cc->at(1)); |
|
1185 length.load_item_force(cc->at(2)); |
|
1186 log2ArrayIndexScale.load_item_force(cc->at(3)); |
|
1187 |
|
1188 __ call_runtime_leaf(StubRoutines::vectorizedMismatch(), getThreadTemp(), result_reg, cc->args()); |
|
1189 __ move(result_reg, result); |
|
1190 } |
|
1191 |
1115 // _i2l, _i2f, _i2d, _l2i, _l2f, _l2d, _f2i, _f2l, _f2d, _d2i, _d2l, _d2f |
1192 // _i2l, _i2f, _i2d, _l2i, _l2f, _l2d, _f2i, _f2l, _f2d, _d2i, _d2l, _d2f |
1116 // _i2b, _i2c, _i2s |
1193 // _i2b, _i2c, _i2s |
1117 LIR_Opr fixed_register_for(BasicType type) { |
1194 LIR_Opr fixed_register_for(BasicType type) { |
1118 switch (type) { |
1195 switch (type) { |
1119 case T_FLOAT: return FrameMap::fpu0_float_opr; |
1196 case T_FLOAT: return FrameMap::fpu0_float_opr; |