From a4f92b8564357f355695a20ef7fa7b9c24ef3d9e Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Wed, 23 Sep 2020 09:45:08 -0700 Subject: [PATCH] Removes some undefined behaviour in f2xm1 unit test If the input range is outside of -1.0 to +1.0 then the result is undefined. To avoid precision problems just check for zero, aka 2^0-1 which also returns zero --- unittests/ASM/X87/D9_F0.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unittests/ASM/X87/D9_F0.asm b/unittests/ASM/X87/D9_F0.asm index 0de8ba9de..de5df3651 100644 --- a/unittests/ASM/X87/D9_F0.asm +++ b/unittests/ASM/X87/D9_F0.asm @@ -1,7 +1,7 @@ %ifdef CONFIG { "RegData": { - "MM7": ["0xC000000000000000", "0x4000"] + "MM7": ["0x0000000000000000", "0x0000"] }, "MemoryRegions": { "0x100000000": "4096" @@ -17,5 +17,5 @@ hlt align 8 data: - dt 2.0 + dt 0.0 dq 0