Merge pull request #4741 from pmatos/fninit_tests

asm_tests: Tests for fninit
This commit is contained in:
Ryan Houdek authored and GitHub committed 2025-08-05 19:29:58 -07:00
commit 4dbfa2febb
3 files changed
+51 -4

No files matched your search

+8 -4
View File
@@ -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
+21
View File
@@ -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
+22
View File
@@ -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