mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-12-12 08:35:59 +00:00
commit
3ef9ea94e5
35
unittests/ASM/X87/D9_E4.asm
Normal file
35
unittests/ASM/X87/D9_E4.asm
Normal 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
|
36
unittests/ASM/X87_F64/D9_E4_F64.asm
Normal file
36
unittests/ASM/X87_F64/D9_E4_F64.asm
Normal 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
|
Loading…
Reference in New Issue
Block a user