We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sahf
lahf
When executing the sahf or lahff instructions, AH should be stored or loaded, but rather AL is used.
lahff
AH
AL
Reference: Ref. Intel 64 and IA-32 Architecture Software Developer's Manual Vol. 2B 4-578 Ref. Intel 64 and IA-32 Architecture Software Developer's Manual Vol. 2A 3-517
Affected instructions:
0x9e # sahf 0x9f # lahf
NOTE: All combinations of prefixes are omitted.
Instruction:
00000000 9E sahf
Input:
binsec disasm -decode 9e
Observed output:
⎧ 0: SF := eax₍₃₂₎{7} ⎪ 1: ZF := eax₍₃₂₎{6} ⎪ 2: AF := eax₍₃₂₎{4} sahf ⎨ 3: PF := eax₍₃₂₎{2} ⎪ 4: CF := eax₍₃₂₎{0} ⎩ 5: goto ({0x00000001; 32}, 0)
Expected output: Use AH instead of AL.
OS:
# uname -a Linux ubuntu 4.10.0-28-generic #32-Ubuntu SMP Fri Jun 30 05:32:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux # cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=17.04 DISTRIB_CODENAME=zesty DISTRIB_DESCRIPTION="Ubuntu 17.04"
BINSEC: 20170301 0.1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
When executing the
sahf
orlahff
instructions,AH
should be stored or loaded, but ratherAL
is used.Reference:
Ref. Intel 64 and IA-32 Architecture Software Developer's Manual Vol. 2B 4-578
Ref. Intel 64 and IA-32 Architecture Software Developer's Manual Vol. 2A 3-517
Affected instructions:
NOTE: All combinations of prefixes are omitted.
Reproduction guide
Instruction:
Input:
Observed output:
Expected output:
Use
AH
instead ofAL
.System Info
OS:
BINSEC: 20170301 0.1
The text was updated successfully, but these errors were encountered: