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

Method PF2IWOp

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

Source from the content-addressed store, hash-verified

3114}
3115
3116void OpDispatchBuilder::PF2IWOp(OpcodeArgs) {
3117 Ref Src = LoadSource(FPRClass, Op, Op->Src[0], Op->Flags);
3118
3119 const auto Size = OpSizeFromDst(Op);
3120
3121 // Float to int32_t
3122 Src = _Vector_FToZS(Size, OpSize::i32Bit, Src);
3123
3124 // We now need to transpose the lower 16-bits of each element together
3125 // Only needing to move the upper element down in this case
3126 Src = _VUnZip(Size, OpSize::i16Bit, Src, Src);
3127
3128 // Now we need to sign extend the 16bit value to 32-bit
3129 Src = _VSXTL(Size, OpSize::i16Bit, Src);
3130 StoreResult_WithOpSize(FPRClass, Op, Op->Dest, Src, Size, OpSize::iInvalid);
3131}
3132
3133void OpDispatchBuilder::PMULHRWOp(OpcodeArgs) {
3134 const auto Size = OpSizeFromSrc(Op);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected