| 1751 | } |
| 1752 | |
| 1753 | void OpDispatchBuilder::BLSMSKBMIOp(OpcodeArgs) { |
| 1754 | // Equivalent to: (Src - 1) ^ Src |
| 1755 | LOGMAN_THROW_A_FMT(Op->InstSize >= 4, "No masking needed"); |
| 1756 | const auto Size = OpSizeFromSrc(Op); |
| 1757 | |
| 1758 | auto* Src = LoadSource(GPRClass, Op, Op->Src[0], Op->Flags, {.AllowUpperGarbage = true}); |
| 1759 | auto Result = _Xor(Size, Sub(Size, Src, 1), Src); |
| 1760 | |
| 1761 | StoreResult(GPRClass, Op, Result, OpSize::iInvalid); |
| 1762 | InvalidatePF_AF(); |
| 1763 | |
| 1764 | // CF set according to the Src |
| 1765 | auto CFInv = To01(OpSize::i64Bit, Src); |
| 1766 | |
| 1767 | // The output of BLSMSK is always nonzero, so TST will clear Z (along with C |
| 1768 | // and O) while setting S. |
| 1769 | SetNZ_ZeroCV(Size, Result); |
| 1770 | SetCFInverted(CFInv); |
| 1771 | } |
| 1772 | |
| 1773 | void OpDispatchBuilder::BLSRBMIOp(OpcodeArgs) { |
| 1774 | // Equivalent to: (Src - 1) & Src |
nothing calls this directly
no outgoing calls
no test coverage detected