--- old/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp 2018-10-31 14:22:33.499959979 +0100 +++ new/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp 2018-10-31 14:22:33.380960073 +0100 @@ -725,6 +725,36 @@ } +void LIRGenerator::do_BitIntrinsic(Intrinsic* x) { + address routine = NULL; + + if (x->id() == vmIntrinsics::_setBit) + routine = StubRoutines::setBit(); + else if (x->id() == vmIntrinsics::_clrBit) + routine = StubRoutines::clrBit(); + + assert(routine != NULL, "bit intrinsic not available"); + + LIRItem bits(x->argument_at(0), this); + LIRItem index(x->argument_at(1), this); + + bits.load_item(); + LIR_Address* a = new LIR_Address(bits.result(), T_BYTE); + + BasicTypeList signature(2); + signature.append(T_ADDRESS); + signature.append(T_INT); + + CallingConvention* cc = frame_map()->c_calling_convention(&signature); + + LIR_Opr addr = new_pointer_register(); + __ leal(LIR_OprFact::address(a), addr); + __ move(addr, cc->at(0)); + + index.load_item_force(cc->at(1)); + + __ call_runtime_leaf(routine, getThreadTemp(), LIR_OprFact::illegalOpr, cc->args()); +} void LIRGenerator::do_MathIntrinsic(Intrinsic* x) { assert(x->number_of_arguments() == 1 || (x->number_of_arguments() == 2 && x->id() == vmIntrinsics::_dpow), "wrong type");