diff --git a/unittests/ASM/X87_F64/D9_F9_2_F64.asm b/unittests/ASM/X87_F64/D9_F9_2_F64.asm new file mode 100644 index 000000000..1940c6b3b --- /dev/null +++ b/unittests/ASM/X87_F64/D9_F9_2_F64.asm @@ -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