Skip to content
New issue

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

LAHF is not support in all 64-bit processors #181

Closed
derekbruening opened this issue Nov 27, 2014 · 5 comments
Closed

LAHF is not support in all 64-bit processors #181

derekbruening opened this issue Nov 27, 2014 · 5 comments

Comments

@derekbruening
Copy link
Contributor

From qin.zhao@gmail.com on July 29, 2009 14:26:14

According to Intel Manual, LAHF instruction is valid in 64-bit mode only if
CPUID.80000001H:ECX.LAHF-SAHF[bit 0] = 1.
So LAHF is not invalid in some processor, e.g. Intel(R) Xeon(R) CPU X5460.
On such processor, the dr_save_arith_flags generates bad instruction.
We got to find another way to save arith flags efficiently.

Original issue: http://code.google.com/p/dynamorio/issues/detail?id=181

@derekbruening
Copy link
Contributor Author

From qin.zhao@gmail.com on July 29, 2009 11:31:12

It is the same for SAHF

@derekbruening
Copy link
Contributor Author

From qin.zhao@gmail.com on July 29, 2009 11:52:14

Intel(R) Xeon(R) CPU X5460 seems support LAHF and SAHF, but there are some processors
do not support LAHF/SAHF.

@derekbruening
Copy link
Contributor Author

From derek.br...@gmail.com on July 29, 2009 12:01:49

This was PR 249775. DR already checks for this and aborts with a fatal error on a
processor that does not support lahf/sahf. Since AFAIK only very early Intel 64-bit
chips (and maybe early AMD64) did not support lahf and sahf we saw adding full
support as very low priority.

Labels: -Priority-Medium Priority-Low

@derekbruening
Copy link
Contributor Author

From derek.br...@gmail.com on July 29, 2009 12:03:14

Did you actually hit a problem without hitting the fatal error? Then please fix the
checking code in proc_init().

@derekbruening
Copy link
Contributor Author

From qin.zhao@gmail.com on September 29, 2009 10:30:48

Status: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant