From 9f15d9ee5784d607bbeaab69302f4d7190a8b52c Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 2 Dec 2024 08:26:14 +0200 Subject: [PATCH] [UCRT:MATH] Implement _dtest, _fdtest --- sdk/lib/ucrt/math/_dtest.c | 23 +++++++++++++++++++++++ sdk/lib/ucrt/math/_fdtest.c | 23 +++++++++++++++++++++++ sdk/lib/ucrt/math/math.cmake | 2 ++ 3 files changed, 48 insertions(+) create mode 100644 sdk/lib/ucrt/math/_dtest.c create mode 100644 sdk/lib/ucrt/math/_fdtest.c diff --git a/sdk/lib/ucrt/math/_dtest.c b/sdk/lib/ucrt/math/_dtest.c new file mode 100644 index 00000000000..34b03b52b36 --- /dev/null +++ b/sdk/lib/ucrt/math/_dtest.c @@ -0,0 +1,23 @@ +// +// _dtest.c +// +// Copyright (c) 2024 Timo Kreuzer +// +// Implementation of _dtest. +// +// SPDX-License-Identifier: MIT +// + +#include + +#ifdef _MSC_VER +#pragma function(_dtest) +#endif + +_Check_return_ +short +__cdecl +_dtest(_In_ double* _Px) +{ + return _dclass(*_Px); +} diff --git a/sdk/lib/ucrt/math/_fdtest.c b/sdk/lib/ucrt/math/_fdtest.c new file mode 100644 index 00000000000..584d193191f --- /dev/null +++ b/sdk/lib/ucrt/math/_fdtest.c @@ -0,0 +1,23 @@ +// +// _fdtest.c +// +// Copyright (c) 2024 Timo Kreuzer +// +// Implementation of _fdtest. +// +// SPDX-License-Identifier: MIT +// + +#include + +#ifdef _MSC_VER +#pragma function(_fdtest) +#endif + +_Check_return_ +short +__cdecl +_fdtest(_In_ float* _Px) +{ + return _fdclass(*_Px); +} diff --git a/sdk/lib/ucrt/math/math.cmake b/sdk/lib/ucrt/math/math.cmake index 69f213e743f..06085f852f7 100644 --- a/sdk/lib/ucrt/math/math.cmake +++ b/sdk/lib/ucrt/math/math.cmake @@ -1,6 +1,8 @@ list(APPEND UCRT_MATH_SOURCES math/_dclass.c + math/_dtest.c math/_fdclass.c + math/_fdtest.c math/matherr.cpp )