Add ESIL for x86 CMC instruction ##esil (#18032)

This commit is contained in:
Rene Laemmert 2020-12-13 23:11:58 +01:00 committed by GitHub
parent 693e777638
commit 604cf9b798
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View File

@ -510,6 +510,9 @@ static void anop_esil(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len,
case X86_INS_CLC:
esilprintf (op, "0,cf,:=");
break;
case X86_INS_CMC:
esilprintf (op, "cf,!,cf,=");
break;
case X86_INS_STC:
esilprintf (op, "1,cf,:=");
break;

View File

@ -2457,3 +2457,23 @@ EXPECT=<<EOF
0x00000000
EOF
RUN
NAME=cmc
FILE=-
EXPECT=<<EOF
0x00000000
0x00000001
EOF
CMDS=<<EOF
e io.va=true
e esil.debug=true
e asm.arch=x86
e asm.bits=32
aei
aeim
"wa cmc"
aer?eflags
aes
aer?eflags
EOF
RUN