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

Method AADOp

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

Source from the content-addressed store, hash-verified

2914}
2915
2916void OpDispatchBuilder::AADOp(OpcodeArgs) {
2917 auto A = LoadGPRRegister(X86State::REG_RAX);
2918 auto AH = _Lshr(OpSize::i32Bit, A, Constant(8));
2919 auto Imm8 = Constant(Op->Src[0].Data.Literal.Value & 0xFF);
2920 auto NewAL = Add(OpSize::i64Bit, A, _Mul(OpSize::i64Bit, AH, Imm8));
2921 auto Result = _And(OpSize::i64Bit, NewAL, Constant(0xFF));
2922 StoreGPRRegister(X86State::REG_RAX, Result, OpSize::i16Bit);
2923
2924 SetNZ_ZeroCV(OpSize::i8Bit, Result);
2925 CalculatePF(Result);
2926 InvalidateAF();
2927}
2928
2929void OpDispatchBuilder::XLATOp(OpcodeArgs) {
2930 Ref Src = MakeSegmentAddress(X86State::REG_RBX, Op->Flags, X86Tables::DecodeFlags::FLAG_DS_PREFIX);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected