unittests/ASM: Adds unittests for undocumented x87 instruction encodings

For more information:
https://en.wikipedia.org/wiki/List_of_x86_instructions#cite_note-x87_alias-346

For #5289
This commit is contained in:
Ryan Houdek committed 2026-02-10 13:25:53 -08:00
1 parent 8230b5faf4
commit a2cdd72db0
3 files changed
+63

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
%ifdef CONFIG
{
"RegData": {
"RAX": "0x1"
}
}
%endif
finit
fld1
fldz
fcom st1
fnstsw ax
cmp ah, 0x31
je good
mov rax, 0
hlt
good:
mov rax, 1
hlt
+23
View File
@@ -0,0 +1,23 @@
%ifdef CONFIG
{
"RegData": {
"RAX": "0x1"
}
}
%endif
; Tests undocumented fcom implementation at 0xdc, 0xd0+i
finit
fld1
fldz
; fcom st1
db 0xdc, 0xd1
fnstsw ax
cmp ah, 0x31
je good
mov rax, 0
hlt
good:
mov rax, 1
hlt
+19
View File
@@ -0,0 +1,19 @@
%ifdef CONFIG
{
"RegData": {
"MM6": ["0x8000000000000000", "0x3FFF"],
"MM7": ["0x8000000000000000", "0x3FFF"]
}
}
%endif
; Only tests pop behaviour
; Tests undocumented fcomp implementation at 0xdc, 0xd8+i
finit
fld1
fldz
; fcomp
db 0xdc, 0xd9
fld1
hlt