| 1515 | } |
| 1516 | |
| 1517 | Ref OpDispatchBuilder::PINSROpImpl(OpcodeArgs, IR::OpSize ElementSize, const X86Tables::DecodedOperand& Src1Op, |
| 1518 | const X86Tables::DecodedOperand& Src2Op, const X86Tables::DecodedOperand& Imm) { |
| 1519 | const auto Size = OpSizeFromDst(Op); |
| 1520 | const auto NumElements = IR::NumElements(Size, ElementSize); |
| 1521 | const uint64_t Index = Imm.Literal() & (NumElements - 1); |
| 1522 | Ref Src1 = LoadSource_WithOpSize(FPRClass, Op, Src1Op, Size, Op->Flags); |
| 1523 | |
| 1524 | if (Src2Op.IsGPR()) { |
| 1525 | // If the source is a GPR then convert directly from the GPR. |
| 1526 | auto Src2 = LoadSource_WithOpSize(GPRClass, Op, Src2Op, GetGPROpSize(), Op->Flags); |
| 1527 | return _VInsGPR(Size, ElementSize, Index, Src1, Src2); |
| 1528 | } |
| 1529 | |
| 1530 | // If loading from memory then we only load the element size |
| 1531 | Ref Src2 = MakeSegmentAddress(Op, Src2Op); |
| 1532 | return _VLoadVectorElement(Size, ElementSize, Src1, Index, Src2); |
| 1533 | } |
| 1534 | |
| 1535 | template<IR::OpSize ElementSize> |
| 1536 | void OpDispatchBuilder::PINSROp(OpcodeArgs) { |
nothing calls this directly
no test coverage detected