lifting-bits / remill

Library for lifting machine code to LLVM bitcode
Apache License 2.0
1.22k stars 142 forks source link

Resolve semantics tests on AMD systems #637

Closed spotlightishere closed 1 year ago

spotlightishere commented 1 year ago

Unlike Intel, AMD has x87 pointer registers set to zero in most scenarios (cite their manual, p. 26):

FXSAVE does not save the x87 pointer registers (last instruction pointer, last data pointer, and last opcode), except in the relatively rare cases in which the exception-summary (ES) bit in the x87 status word is set to 1, indicating that an unmasked x87 exception has occurred.

As the x87 fop/dp are currently set to zero, additionally zeroing out ip allows lifted values to fully match native. This resolves #471.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.