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

Method AVXVectorUnaryOp

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

Source from the content-addressed store, hash-verified

660}
661
662void OpDispatchBuilder::AVXVectorUnaryOp(OpcodeArgs, IROps IROp, IR::OpSize ElementSize) {
663 // In the event of a scalar operation and a vector source, then
664 // we can specify the entire vector length in order to avoid
665 // unnecessary sign extension on the element to be operated on.
666 // In the event of a memory operand, we load the exact element size.
667 const auto SrcSize = OpSizeFromSrc(Op);
668
669 Ref Src = LoadSource_WithOpSize(FPRClass, Op, Op->Src[0], SrcSize, Op->Flags);
670
671 DeriveOp(ALUOp, IROp, _VFSqrt(SrcSize, ElementSize, Src));
672
673 // NOTE: We don't need to clear the upper lanes here, since the
674 // IR ops make use of 128-bit AdvSimd for 128-bit cases,
675 // which, on hardware with SVE, zero-extends as part of
676 // storing into the destination.
677
678 StoreResult(FPRClass, Op, ALUOp, OpSize::iInvalid);
679}
680
681void OpDispatchBuilder::VectorUnaryDuplicateOpImpl(OpcodeArgs, IROps IROp, IR::OpSize ElementSize) {
682 const auto Size = OpSizeFromSrc(Op);

Callers

nothing calls this directly

Calls 1

DeriveOpFunction · 0.85

Tested by

no test coverage detected