| 1730 | } |
| 1731 | |
| 1732 | void OpDispatchBuilder::BLSIBMIOp(OpcodeArgs) { |
| 1733 | // Equivalent to performing: SRC & -SRC |
| 1734 | LOGMAN_THROW_A_FMT(Op->InstSize >= 4, "No masking needed"); |
| 1735 | const auto Size = OpSizeFromSrc(Op); |
| 1736 | |
| 1737 | auto* Src = LoadSource(GPRClass, Op, Op->Src[0], Op->Flags, {.AllowUpperGarbage = true}); |
| 1738 | auto NegatedSrc = _Neg(Size, Src); |
| 1739 | auto Result = _And(Size, Src, NegatedSrc); |
| 1740 | |
| 1741 | StoreResult(GPRClass, Op, Result, OpSize::iInvalid); |
| 1742 | |
| 1743 | // CF is cleared if Src is zero, otherwise it's set. However, Src is zero iff |
| 1744 | // Result is zero, so we can test the result instead. So, CF is just the |
| 1745 | // inverted ZF. |
| 1746 | // |
| 1747 | // ZF/SF/OF set as usual. |
| 1748 | SetNZ_ZeroCV(Size, Result); |
| 1749 | InvalidatePF_AF(); |
| 1750 | SetCFInverted(GetRFLAG(X86State::RFLAG_ZF_RAW_LOC)); |
| 1751 | } |
| 1752 | |
| 1753 | void OpDispatchBuilder::BLSMSKBMIOp(OpcodeArgs) { |
| 1754 | // Equivalent to: (Src - 1) ^ Src |
nothing calls this directly
no outgoing calls
no test coverage detected