From c69fc844a011a41e027ce348af66c86b9a55c331 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Sun, 22 Nov 2015 01:12:34 +0000 Subject: [PATCH 1/1] [CRT] Check for positive and negative infinity in exp(). svn path=/trunk/; revision=69998 --- reactos/lib/sdk/crt/math/i386/exp_asm.s | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/reactos/lib/sdk/crt/math/i386/exp_asm.s b/reactos/lib/sdk/crt/math/i386/exp_asm.s index 3dd5be060b9..fe2e214723b 100644 --- a/reactos/lib/sdk/crt/math/i386/exp_asm.s +++ b/reactos/lib/sdk/crt/math/i386/exp_asm.s @@ -11,6 +11,18 @@ _exp: mov ebp, esp fld qword ptr [ebp + 8] + fxam + fstsw ax + fwait + sahf + jnp .not_inf + jnc .not_inf + test ah, 2 + jz .done + fstp st + fldz + jmp .done +.not_inf: fldl2e fmul st, st(1) fst st(1) @@ -22,7 +34,7 @@ _exp: faddp st(1), st fscale fstp st(1) - +.done: pop ebp ret -- 2.17.1