| 3736 | } |
| 3737 | |
| 3738 | void OpDispatchBuilder::BSROp(OpcodeArgs) { |
| 3739 | const auto GPRSize = GetGPROpSize(); |
| 3740 | const auto DstSize = OpSizeFromDst(Op) == OpSize::i16Bit ? OpSize::i16Bit : GPRSize; |
| 3741 | Ref Dest = LoadSource_WithOpSize(GPRClass, Op, Op->Dest, DstSize, Op->Flags, {.AllowUpperGarbage = true}); |
| 3742 | Ref Src = LoadSource(GPRClass, Op, Op->Src[0], Op->Flags, {.AllowUpperGarbage = true}); |
| 3743 | |
| 3744 | // Find the MSB of this source |
| 3745 | auto Result = _FindMSB(OpSizeFromSrc(Op), Src); |
| 3746 | |
| 3747 | // OF, SF, AF, PF, CF all undefined |
| 3748 | // ZF is set to 1 if the source was zero |
| 3749 | SetZ_InvalidateNCV(OpSizeFromSrc(Op), Src); |
| 3750 | |
| 3751 | // If Src was zero then the destination doesn't get modified |
| 3752 | auto SelectOp = NZCVSelect(GPRSize, {COND_EQ}, Dest, Result); |
| 3753 | StoreResult_WithOpSize(GPRClass, Op, Op->Dest, SelectOp, DstSize, OpSize::iInvalid); |
| 3754 | } |
| 3755 | |
| 3756 | void OpDispatchBuilder::CMPXCHGOp(OpcodeArgs) { |
| 3757 | // CMPXCHG ModRM, reg, {RAX} |
nothing calls this directly
no outgoing calls
no test coverage detected