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

Method AAMOp

FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp:2902–2914  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2900}
2901
2902void 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
2916void OpDispatchBuilder::AADOp(OpcodeArgs) {
2917 auto A = LoadGPRRegister(X86State::REG_RAX);

Callers

nothing calls this directly

Calls 1

InvalidFunction · 0.85

Tested by

no test coverage detected