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

Function DEF_OP

FEXCore/Source/Interface/Core/JIT/VectorOps.cpp:439–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437}
438
439DEF_OP(VFMinScalarInsert) {
440 const auto Op = IROp->C<IR::IROp_VFMinScalarInsert>();
441 const auto ElementSize = Op->Header.ElementSize;
442 const auto SubRegSize = ConvertSubRegSizePair248(IROp);
443
444 auto ScalarEmit = [this, SubRegSize](ARMEmitter::VRegister Dst, ARMEmitter::VRegister Src1, ARMEmitter::VRegister Src2) {
445 if (HostSupportsAFP) {
446 // AFP.AH lets fmin behave like x86 min
447 fmin(SubRegSize.Scalar, Dst, Src1, Src2);
448 } else {
449 // Only take the first operand if it is strictly less. Otherwise take
450 // the second. This emulates all the weird x86 rules for signed zero and
451 // NaNs. No, they're not IEEE-754 semantics.
452 fcmp(SubRegSize.Scalar, Src1, Src2);
453 fcsel(SubRegSize.Scalar, Dst, Src1, Src2, ARMEmitter::Condition::CC_MI);
454 }
455 };
456
457 // Bit of a tricky detail.
458 // The upper bits of the destination comes from the first source.
459 const auto Dst = GetVReg(Node);
460 const auto Vector1 = GetVReg(Op->Vector1);
461 const auto Vector2 = GetVReg(Op->Vector2);
462
463 VFScalarOperation(IROp->Size, ElementSize, Op->ZeroUpperBits, ScalarEmit, Dst, Vector1, Vector2);
464}
465
466DEF_OP(VFMaxScalarInsert) {
467 const auto Op = IROp->C<IR::IROp_VFMaxScalarInsert>();

Callers

nothing calls this directly

Calls 15

OpSizeToSizeFunction · 0.85
ToUnderlyingFunction · 0.85
DividePow2Function · 0.85
ExtendedMemOperandClass · 0.85
addFunction · 0.85
OpSizeAsBitsFunction · 0.85
ilog2Function · 0.85
AreVectorsSequentialFunction · 0.85
QMethod · 0.80
DMethod · 0.80
HMethod · 0.80
SMethod · 0.80

Tested by

no test coverage detected