| 2900 | } |
| 2901 | |
| 2902 | void OpDispatchBuilder::AAMOp(OpcodeArgs) { |
| 2903 | auto AL = LoadGPRRegister(X86State::REG_RAX, OpSize::i8Bit); |
| 2904 | auto Imm8 = Constant(Op->Src[0].Data.Literal.Value & 0xFF); |
| 2905 | Ref Quotient = _AllocateGPR(true); |
| 2906 | Ref Remainder = _AllocateGPR(true); |
| 2907 | _UDiv(OpSize::i64Bit, AL, Invalid(), Imm8, Quotient, Remainder); |
| 2908 | auto Res = _AddShift(OpSize::i64Bit, Remainder, Quotient, ShiftType::LSL, 8); |
| 2909 | StoreGPRRegister(X86State::REG_RAX, Res, OpSize::i16Bit); |
| 2910 | |
| 2911 | SetNZ_ZeroCV(OpSize::i8Bit, Res); |
| 2912 | CalculatePF(Res); |
| 2913 | InvalidateAF(); |
| 2914 | } |
| 2915 | |
| 2916 | void OpDispatchBuilder::AADOp(OpcodeArgs) { |
| 2917 | auto A = LoadGPRRegister(X86State::REG_RAX); |