Closed artemdinaburg closed 1 year ago
I'm encountering this issue while building the Docker image on a Zen 4 system - these tests seem to only fail at the offset of the x87 FPU state last instruction pointer, and the native bytes appear to always be zero.
From my (very limited, please correct if wrong!) understanding, it seems like this is intentional according to AMD's x87 manual:
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.
Given that the last opcode/data pointer are currently set to zero, would it make sense to resolve this issue by also setting the instruction pointer to zero?
@spotlightishere this sounds like a good PR to make. I think right now we have the tracking of the x87 fp/dp as enabled/disabled via a macro. It seems like regardless of this macro, we should be checking this bit in a few places and zeroing out some things.
Some x86-64 semantics test fail on AMD Zen3 CPUs. An output log is attached. Detailed output:
Full log attached. amd_output.txt.gz