MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / MOVBetweenGPR_FPR

Method MOVBetweenGPR_FPR

FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp:2396–2424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2394template void OpDispatchBuilder::VPMASKMOVOp<true>(OpcodeArgs);
2395
2396void 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
2426Ref OpDispatchBuilder::VFCMPOpImpl(OpSize Size, IR::OpSize ElementSize, Ref Src1, Ref Src2, uint8_t CompType) {
2427 Ref Result {};

Callers

nothing calls this directly

Calls 1

IsGPRMethod · 0.45

Tested by

no test coverage detected