| 2394 | template void OpDispatchBuilder::VPMASKMOVOp<true>(OpcodeArgs); |
| 2395 | |
| 2396 | void OpDispatchBuilder::MOVBetweenGPR_FPR(OpcodeArgs, VectorOpType VectorType) { |
| 2397 | if (Op->Dest.IsGPR() && Op->Dest.Data.GPR.GPR >= FEXCore::X86State::REG_XMM_0) { |
| 2398 | Ref Result {}; |
| 2399 | if (Op->Src[0].IsGPR()) { |
| 2400 | // Loading from GPR and moving to Vector. |
| 2401 | Ref Src = LoadSource_WithOpSize(FPRClass, Op, Op->Src[0], GetGPROpSize(), Op->Flags); |
| 2402 | // zext to 128bit |
| 2403 | Result = _VCastFromGPR(OpSize::i128Bit, OpSizeFromSrc(Op), Src); |
| 2404 | } else { |
| 2405 | // Loading from Memory as a scalar. Zero extend |
| 2406 | Result = LoadSource(FPRClass, Op, Op->Src[0], Op->Flags); |
| 2407 | } |
| 2408 | |
| 2409 | StoreResult_WithAVXInsert(VectorType, FPRClass, Op, Result, OpSize::iInvalid); |
| 2410 | } else { |
| 2411 | Ref Src = LoadSource(FPRClass, Op, Op->Src[0], Op->Flags); |
| 2412 | |
| 2413 | if (Op->Dest.IsGPR()) { |
| 2414 | const auto ElementSize = OpSizeFromDst(Op); |
| 2415 | // Extract element from GPR. Zero extending in the process. |
| 2416 | Src = _VExtractToGPR(OpSizeFromSrc(Op), ElementSize, Src, 0); |
| 2417 | StoreResult(GPRClass, Op, Op->Dest, Src, OpSize::iInvalid); |
| 2418 | } else { |
| 2419 | // Storing first element to memory. |
| 2420 | Ref Dest = LoadSource(GPRClass, Op, Op->Dest, Op->Flags, {.LoadData = false}); |
| 2421 | _StoreMem(FPRClass, OpSizeFromDst(Op), Dest, Src, OpSize::i8Bit); |
| 2422 | } |
| 2423 | } |
| 2424 | } |
| 2425 | |
| 2426 | Ref OpDispatchBuilder::VFCMPOpImpl(OpSize Size, IR::OpSize ElementSize, Ref Src1, Ref Src2, uint8_t CompType) { |
| 2427 | Ref Result {}; |