unittests/3DNow: Fix femms test

We are onyl wanting to test the FTW, which is 16-bit but we were reading
a whole 32-bits. The upper 16-bits was ending up in the reserved
section, which is undefined as to what it contains. In FEX it'll contain
0 but on a Zen 4 CPU it contains 0xFFFF.

Only read the bits we care about.
This commit is contained in:
Ryan Houdek committed 2025-08-08 12:08:52 -07:00
1 parent 5a7ff4780f
commit 60baee4020
1 file changed
+2 -1
+2 -1
View File
@@ -23,6 +23,7 @@ femms
mov rdx, 0xe0000000
o32 fstenv [rdx]
mov eax, dword [rdx + 8] ; Offset 8 in the structure has FTW
mov eax, 0
mov ax, word [rdx + 8] ; Offset 8 in the structure has FTW
hlt