mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 08:00:15 +02:00
unittests/ASM: Test fpatan and fyl2x to clear tag
This commit is contained in:
1 parent
21b8f8e20d
commit
add92f681b
2 files changed
+66
No files matched your search
@@ -0,0 +1,33 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x80"
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
; FEX had a bug in the slow path of x87 stack-optimization pass:
|
||||
; popping the FPU stack never invalidated ST(0)
|
||||
;
|
||||
; Note this test only actually exercises the bug under the jit_1 run
|
||||
; since otherwise the fast path is taken
|
||||
|
||||
fninit
|
||||
|
||||
fld1
|
||||
fldl2e
|
||||
|
||||
fpatan
|
||||
|
||||
fxsave [rel .data]
|
||||
|
||||
; FTW
|
||||
; Bit 6 (popped value) must be 0 now
|
||||
; Bit 7 (result) must be 1
|
||||
movzx eax, byte [rel .data + 4]
|
||||
|
||||
hlt
|
||||
|
||||
align 16
|
||||
.data:
|
||||
times 64 dq 0
|
||||
@@ -0,0 +1,33 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x80"
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
; FEX had a bug in the slow path of x87 stack-optimization pass:
|
||||
; popping the FPU stack never invalidated ST(0)
|
||||
;
|
||||
; Note this test only actually exercises the bug under the jit_1 run
|
||||
; since otherwise the fast path is taken
|
||||
|
||||
fninit
|
||||
|
||||
fld1
|
||||
fld1
|
||||
|
||||
fyl2x
|
||||
|
||||
fxsave [rel .data]
|
||||
|
||||
; FTW
|
||||
; Bit 6 (popped value) must be 0 now
|
||||
; Bit 7 (result) must be 1
|
||||
movzx eax, byte [rel .data + 4]
|
||||
|
||||
hlt
|
||||
|
||||
align 16
|
||||
.data:
|
||||
times 64 dq 0
|
||||
Reference in new issue
Block a user