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

Method ADDSUBPOpImpl

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

Source from the content-addressed store, hash-verified

3016template void OpDispatchBuilder::MOVQ2DQ<true>(OpcodeArgs);
3017
3018Ref OpDispatchBuilder::ADDSUBPOpImpl(OpSize Size, IR::OpSize ElementSize, Ref Src1, Ref Src2) {
3019 if (CTX->HostFeatures.SupportsFCMA) {
3020 if (ElementSize == OpSize::i32Bit) {
3021 auto Swizzle = _VRev64(Size, OpSize::i32Bit, Src2);
3022 return _VFCADD(Size, ElementSize, Src1, Swizzle, 90);
3023 } else {
3024 auto Swizzle = _VExtr(Size, OpSize::i8Bit, Src2, Src2, 8);
3025 return _VFCADD(Size, ElementSize, Src1, Swizzle, 90);
3026 }
3027 } else {
3028 auto ConstantEOR =
3029 LoadAndCacheNamedVectorConstant(Size, ElementSize == OpSize::i32Bit ? NAMED_VECTOR_PADDSUBPS_INVERT : NAMED_VECTOR_PADDSUBPD_INVERT);
3030 auto InvertedSource = _VXor(Size, ElementSize, Src2, ConstantEOR);
3031 return _VFAdd(Size, ElementSize, Src1, InvertedSource);
3032 }
3033}
3034
3035template<IR::OpSize ElementSize>
3036void OpDispatchBuilder::ADDSUBPOp(OpcodeArgs) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected