Closed hksoobe closed 7 years ago
Hello, Please provide full opcode of the instruction.
Maybe I did not understand your design ideas What does "1 4 8" mean? 1 is not changed? 8 is modified? 4 is read?
Hi again ! EFlags is a struct (record) of element (ZF,OF,...). Each element is represented as a combination of "EF_X" flag were EF_X could be :
{ EFlags }
EF_N = $01; // Instruction does not affect flag.
EF_U = $02; // Instruction's effect on flag is undefined.
EF_T = $04; // Instruction tests flag.
EF_M = $08; // Instruction modifies flag (either sets or resets depending on operands).
EF_R = $10; // Instruction resets flag.
EF_S = $20; // Instruction sets flag.
EF_P = $40; // Instruction restores prior value of flag.
EF_TM = EF_T or EF_M;
So you need to test against those flags to see whether the flag is set or not. SF = 4 => instruction TESTS flag SF. ZF = 8 => instruction MODIFIES flag ZF. SF = 12 => means (SF = (4 or 8)) => instruction TESTS AND MODIFIES flag SF.
Please, close the issue if this comment solved your problem. PS: Everything was enplaned in the source (TInstruction).
Regrads, Mahdi.
thank you very much
EFlags is error