mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 14:00:16 +02:00
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:
3 files changed
+63
No files matched your search
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in new issue
Block a user