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

Method AASOp

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

Source from the content-addressed store, hash-verified

2883}
2884
2885void OpDispatchBuilder::AASOp(OpcodeArgs) {
2886 auto A = LoadGPRRegister(X86State::REG_RAX);
2887 auto AF = CalculateAFForDecimal(A);
2888
2889 // CF = AF, OF/SF/ZF/PF undefined
2890 SetCFDirect_InvalidateNZV(AF);
2891 SetAFAndFixup(AF);
2892 CalculateDeferredFlags();
2893
2894 // AX = CF ? (AX - 0x106) : 0
2895 A = NZCVSelect(OpSize::i32Bit, {COND_UGE} /* CF = 1 */, Sub(OpSize::i32Bit, A, 0x106), A);
2896
2897 // AL = AL & 0x0F
2898 A = _And(OpSize::i32Bit, A, Constant(0xFF0F));
2899 StoreGPRRegister(X86State::REG_RAX, A, OpSize::i16Bit);
2900}
2901
2902void OpDispatchBuilder::AAMOp(OpcodeArgs) {
2903 auto AL = LoadGPRRegister(X86State::REG_RAX, OpSize::i8Bit);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected