Merge pull request #3848 from pmatos/FTSTX87Tests

Tests for X87 FTST
This commit is contained in:
Alyssa Rosenzweig 2024-07-09 09:10:29 -04:00 committed by GitHub
commit 3ef9ea94e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,35 @@
%ifdef CONFIG
{
"RegData": {
"RAX": "0x100",
"RBX": "0x0",
"RCX": "0x4000"
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
fld dword [rel positive]
ftst
fnstsw ax
and rax, 0x4700
mov rbx, rax
fldz
ftst
fnstsw ax
and rax, 0x4700
mov rcx, rax
fld dword [rel negative]
ftst
fnstsw ax
and rax, 0x4700
hlt
align 16
positive: dd 3.14159
negative: dd -2.71828

View File

@ -0,0 +1,36 @@
%ifdef CONFIG
{
"RegData": {
"RAX": "0x100",
"RBX": "0x0",
"RCX": "0x4000"
},
"MemoryRegions": {
"0x100000000": "4096"
},
"Env": { "FEX_X87REDUCEDPRECISION" : "1" }
}
%endif
fld dword [rel positive]
ftst
fnstsw ax
and rax, 0x4700
mov rbx, rax
fldz
ftst
fnstsw ax
and rax, 0x4700
mov rcx, rax
fld dword [rel negative]
ftst
fnstsw ax
and rax, 0x4700
hlt
align 8
positive: dd 3.14159
negative: dd -2.71828