asm_tests: Re-optimize FYL2X for reduced precision x87 path

This commit is contained in:
Paulo Matos authored and Ryan Houdek committed 2026-06-30 15:00:16 -07:00
1 parent 37b010795e
commit b7280a765d
1 file changed
+32
+32
View File
@@ -0,0 +1,32 @@
%ifdef CONFIG
{
"RegData": {
"RAX": "1"
},
"Env": { "FEX_X87REDUCEDPRECISION" : "1" }
}
%endif
%include "checkprecision.mac"
mov rsi, 0xe0000000
; y=1, x = 0.25
fld1
lea rdx, [rel x_quarter]
fld qword [rdx]
fyl2xp1
fstp qword [rsi]
check_relerr_d rel expected_quarter, rsi, rel tolerance
hlt
align 8
x_quarter:
dq 0x3FD0000000000000
expected_quarter:
dq 0x3FD49A784BCD1B87 ; matches the LUT-based F64 FYL2X path
tolerance:
dq 0x3CB0000000000000 ; 2^-52, ~1 ULP relative error
define_check_data_constants