mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 18:00:17 +02:00
Merge pull request #4741 from pmatos/fninit_tests
asm_tests: Tests for fninit
This commit is contained in:
3 files changed
+51
-4
No files matched your search
@@ -7,12 +7,16 @@
|
||||
}
|
||||
%endif
|
||||
|
||||
mov eax, 0
|
||||
mov esp, 0xe0000008
|
||||
section .bss
|
||||
control: resb 2 ; Reserve space for the FPU control word
|
||||
|
||||
section .text
|
||||
global _start
|
||||
_start:
|
||||
fninit
|
||||
|
||||
; Ensures that fnstcw after fninit sets the correct value
|
||||
fnstcw [esp]
|
||||
mov ax, word [esp]
|
||||
fnstcw [rel control]
|
||||
mov ax, word [rel control]
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,21 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x037F"
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
section .bss
|
||||
control: resb 2 ; Reserve space for the FPU control word
|
||||
|
||||
section .text
|
||||
global _start
|
||||
_start:
|
||||
fninit
|
||||
|
||||
; Ensures that fnstcw after fninit sets the correct value
|
||||
fnstcw [rel control]
|
||||
mov ax, word [rel control]
|
||||
|
||||
hlt
|
||||
@@ -0,0 +1,22 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x037F"
|
||||
},
|
||||
"Env": { "FEX_X87REDUCEDPRECISION" : "1" }
|
||||
}
|
||||
%endif
|
||||
|
||||
section .bss
|
||||
control: resb 2 ; Reserve space for the FPU control word
|
||||
|
||||
section .text
|
||||
global _start
|
||||
_start:
|
||||
fninit
|
||||
|
||||
; Ensures that fnstcw after fninit sets the correct value
|
||||
fnstcw [rel control]
|
||||
mov ax, word [rel control]
|
||||
|
||||
hlt
|
||||
Reference in new issue
Block a user