Skip to content
Snippets Groups Projects
Commit 239106a3 authored by Andrew Cooper's avatar Andrew Cooper
Browse files

x86: Restore the use of SAHF/LAHF in 64bit mode

The SAHF/LAHF instructions date from the 32bit x86 days, and where initially
marked as obsolete in the AMD 64bit spec.  All processors have the requisite
logic, as they are backwards compatible in 32bit mode.

The original 64bit CPUs from Intel and AMD would raise #UD for these
instructions, per the AMD64 spec.

However, they were were sufficiently critical for software emulators that the
instructions were "reintroduced" into the AMD64 spec, with a new CPUID bit
indicating that the they were now usable in 64bit mode.

In practice, every 64bit capable processor since 2005 has supported them.

Fixes #837
parent eaf05142
Branches
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment