Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
87f635c
fix(libc): follow msun for log1pf
MarcZX10 Oct 23, 2026
134201f
test(libc): cover log1pf boundaries
MarcZX10 Oct 23, 2026
ae53b71
fix(libc): follow msun's own negative-input branches in log1pf
MarcZX10 Oct 27, 2026
3fcdc09
test(libc): pin log1pf bit for bit at the small-negative and range-re…
MarcZX10 Oct 27, 2026
780fa4b
docs(libc): record that log1pf runs msun's own negative-input branches
MarcZX10 Oct 27, 2026
c5f7ab5
fix(libc): follow msun for log1pf
MarcZX10 Oct 23, 2026
3ee107d
test(libc): cover log1pf boundaries
MarcZX10 Oct 23, 2026
0d53ad6
fix(libc): follow msun's own negative-input branches in log1pf
MarcZX10 Oct 27, 2026
4368ceb
test(libc): pin log1pf bit for bit at the small-negative and range-re…
MarcZX10 Oct 27, 2026
1682c72
docs(libc): record that log1pf runs msun's own negative-input branches
MarcZX10 Oct 27, 2026
e447a74
fix(libc): follow msun for log1pf
MarcZX10 Oct 23, 2026
f92c32c
test(libc): cover log1pf boundaries
MarcZX10 Oct 23, 2026
018308e
fix(libc): compute expf with FreeBSD msun's algorithm, as titles' lib…
JJenkx Oct 25, 2026
cdd012c
fix(libc): compute erff and erfcf with fdlibm's algorithm, as titles'…
JJenkx Oct 25, 2026
81fa0ec
fix(libc): compute expf with FreeBSD msun's algorithm, as titles' lib…
JJenkx Oct 25, 2026
20e94cc
fix(libc): integrate current main into PR 10226
JJenkx Oct 30, 2026
2666775
fix(libc): integrate current main into PR 10007
JJenkx Oct 30, 2026
e465919
fix(libc): integrate expf with current main and actual log1pf parent
JJenkx Oct 30, 2026
1114faf
fix(libc): retain current log1pf and main in erff stack
JJenkx Oct 30, 2026
8189720
fix(libc): retain refreshed expm1f parent without unused duplicate
JJenkx Oct 30, 2026
7189b23
fix(libc): retain current main logb debt in erff stack
JJenkx Oct 30, 2026
5ceabe9
fix(libc): follow msun for log1pf
MarcZX10 Oct 23, 2026
a0bd024
test(libc): cover log1pf boundaries
MarcZX10 Oct 23, 2026
e48cc71
fix(libc): follow msun's own negative-input branches in log1pf
MarcZX10 Oct 27, 2026
1e43a6d
test(libc): pin log1pf bit for bit at the small-negative and range-re…
MarcZX10 Oct 27, 2026
724fdad
docs(libc): record that log1pf runs msun's own negative-input branches
MarcZX10 Oct 27, 2026
a104527
fix(libc): compute expf with FreeBSD msun's algorithm, as titles' lib…
JJenkx Oct 25, 2026
91189e4
chore(libc): integrate current main math regressions
JJenkx Nov 2, 2026
a5ce4ac
chore(libc): integrate current main math regressions
JJenkx Nov 2, 2026
7578020
chore(libc): retain current log1pf prerequisite ancestry
JJenkx Nov 2, 2026
7f098b3
chore(libc): retain current expf prerequisite ancestry
JJenkx Nov 2, 2026
5407163
docs(libc): keep the source notices of the erff and erfcf port
IL2P Nov 3, 2026
bc7dd2e
Merge branch 'main' into windows/libc-expf-msun
oneandonlydean Nov 4, 2026
fd06482
chore(libc): integrate current main regressions
JJenkx Nov 4, 2026
1dad94b
chore(libc): retain actual current prerequisite
JJenkx Nov 4, 2026
735d66d
test(libc): retain one identical expf parent fixture
JJenkx Nov 4, 2026
ef66ffe
Merge remote-tracking branch 'origin/main' into windows/libc-expf-msun
JJenkx Nov 5, 2026
7b33bac
Merge remote-tracking branch 'origin/main' into windows/libc-erff-msun
JJenkx Nov 5, 2026
08bd5d1
chore(libc): integrate current main and shared build fix
JJenkx Nov 5, 2026
39a8b49
chore(libc): integrate current main and shared build fix
JJenkx Nov 5, 2026
b111e49
Merge remote-tracking branch 'origin/main' into windows/libc-expf-msun
oneandonlydean Nov 5, 2026
a11ad9b
chore(libc): retain actual current prerequisite
JJenkx Nov 5, 2026
6862f51
chore(libc): preserve maintainer expf refresh as actual prerequisite
JJenkx Nov 5, 2026
a146750
Merge remote-tracking branch 'origin/main' into HEAD
JJenkx Nov 11, 2026
87d5522
docs(libc): keep the FreeBSD msun notice for the expf and log1pf ports
JJenkx Nov 11, 2026
e381653
Merge branch 'windows/libc-expf-msun' into windows/libc-erff-msun
JJenkx Nov 11, 2026
95c1566
Merge remote-tracking branch 'origin/main' into windows/libc-erff-msun
JJenkx Nov 13, 2026
b29bd75
Merge remote-tracking branch 'origin/main' into windows/libc-expf-msun
JJenkx Nov 13, 2026
b756c70
Merge remote-tracking branch 'origin/main' into maint/expf-main-refre…
JJenkx Nov 17, 2026
cf07c17
Merge branch 'maint/expf-main-refresh-20261117' into maint/erf-main-r…
JJenkx Nov 17, 2026
ea10526
docs(libc): migrate expf prerequisite gaps to a debt fragment
JJenkx Nov 17, 2026
5969599
Merge refreshed expf prerequisite and retain erff debt fragment
JJenkx Nov 17, 2026
31d691c
Merge commit '7fa48cd1c6cda62b4ebe86575085199a33e08c1d' into work/exp…
JJenkx Nov 20, 2026
61549d8
fix(libc): preserve expf rounding and exception behavior
JJenkx Nov 20, 2026
4e397fc
chore(libc): refresh erff expf prerequisite
JJenkx Nov 20, 2026
324fde3
docs(libc): clarify erf parent validation scope
JJenkx Nov 20, 2026
86fc4fc
chore: merge main and retain expf and lgammal test registrations
JJenkx Nov 22, 2026
ca8a861
Merge commit '86fc4fc9c2f04da5210c6cf23a69aa2f4eed05ce' into HEAD
JJenkx Nov 22, 2026
7faa1a3
build(libc): refresh expf integration on current main
JJenkx Nov 26, 2026
996aaa4
build(libc): isolate expf source and test registration
JJenkx Nov 26, 2026
f1046ea
build(libc): refresh erf integration on current main
JJenkx Nov 26, 2026
d67a7fc
build(libc): inherit expf registration maintenance
JJenkx Nov 26, 2026
f03f975
test(libc): run erff and erfcf regressions independently
JJenkx Nov 26, 2026
f876efc
Merge current main into expf environment preservation
JJenkx Nov 27, 2026
4296b2c
Merge the refreshed expf branch into erff and erfcf
JJenkx Nov 27, 2026
244f4b5
Merge current main into windows/libc-expf-msun
JJenkx Nov 29, 2026
213a674
Merge current main into windows/libc-erff-msun
JJenkx Nov 29, 2026
155d231
Merge #10113 head 244f4b5b65 into windows/libc-erff-msun
JJenkx Nov 29, 2026
9a33984
Merge main 93d64f2d1e into windows/libc-expf-msun
JJenkx Nov 30, 2026
412f172
Merge windows/libc-expf-msun (main 93d64f2d1e) into windows/libc-erff…
JJenkx Nov 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions core/libs/prx/libc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ target_sources(libc PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src/MathGamma.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/MathExact.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/VersionedExtendedPrecision.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/MathExpf.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Bessel.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/J0f.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/J1f.cpp
Expand Down Expand Up @@ -295,6 +296,8 @@ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/MathExact.cpp
TARGET_DIRECTORY libc PROPERTIES COMPILE_OPTIONS "-frounding-math")
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/VersionedExtendedPrecision.cpp
TARGET_DIRECTORY libc PROPERTIES COMPILE_OPTIONS "-frounding-math")
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/MathExpf.cpp
TARGET_DIRECTORY libc PROPERTIES COMPILE_OPTIONS "-frounding-math;-ffp-contract=off")

if(ANYPS5_ENABLE_TSAN)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/exception/Exports.cpp
Expand Down
190 changes: 183 additions & 7 deletions core/libs/prx/libc/src/Math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
/* e_rem_pio2f.c, k_cosf.c and s_cbrtf.c:
* Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
* Debugged and optimized by Bruce D. Evans. */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
/* Derived from FreeBSD lib/msun/src/e_expf.c (release/11.4.0); lib/msun/src/s_log1pf.c (release/11.4.0) */
/* Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
Expand Down Expand Up @@ -1983,7 +1995,74 @@ double APS5_VABI log1p_nid_postfix(double x) {
}
return k * ln2_hi - ((hfsq - (s * (hfsq + R) + (k * ln2_lo + c))) - f);
}
float APS5_VABI log1pf_nid_postfix(float x) { return std::log1p(x); }
static float Log1pfMsun(float x) {
constexpr float Ln2High = 6.9313812256e-01f, Ln2Low = 9.0580006145e-06f, Two25 = 3.355443200e+07f;
constexpr float Lp1 = 6.6666668653e-01f, Lp2 = 4.0000000596e-01f, Lp3 = 2.8571429849e-01f, Lp4 = 2.2222198546e-01f;
constexpr float Lp5 = 1.8183572590e-01f, Lp6 = 1.5313838422e-01f, Lp7 = 1.4798198640e-01f;
const std::int32_t hx = std::bit_cast<std::int32_t>(x);
const std::int32_t ax = hx & 0x7fffffff;
std::int32_t k = 1;
std::int32_t hu = 0;
float f = 0.0f;
float c = 0.0f;
if (hx < 0x3ed413d0) {
if (ax < 0x38000000) {
volatile float two25 = Two25;
if (two25 + x > 0.0f && ax < 0x33800000) return x;
return x - x * x * 0.5f;
}
if (hx > 0 || hx <= static_cast<std::int32_t>(0xbe95f619u)) {
k = 0;
f = x;
hu = 1;
}
}
if (k != 0) {
float u;
if (hx < 0x5a000000) {
volatile float sum = 1.0f + x;
u = sum;
hu = std::bit_cast<std::int32_t>(u);
k = (hu >> 23) - 127;
c = k > 0 ? 1.0f - (u - x) : x - (u - 1.0f);
c /= u;
} else {
u = x;
hu = std::bit_cast<std::int32_t>(u);
k = (hu >> 23) - 127;
c = 0.0f;
}
hu &= 0x007fffff;
if (hu < 0x3504f4) {
u = std::bit_cast<float>(hu | 0x3f800000);
} else {
k += 1;
u = std::bit_cast<float>(hu | 0x3f000000);
hu = (0x00800000 - hu) >> 2;
}
f = u - 1.0f;
}
const float hfsq = 0.5f * f * f;
if (hu == 0) {
if (f == 0.0f) {
if (k == 0) return 0.0f;
c += static_cast<float>(k) * Ln2Low;
return static_cast<float>(k) * Ln2High + c;
}
const float R = hfsq * (1.0f - 0.66666666666666666f * f);
if (k == 0) return f - R;
return static_cast<float>(k) * Ln2High - ((R - (static_cast<float>(k) * Ln2Low + c)) - f);
}
const float s = f / (2.0f + f);
const float z = s * s;
const float R = z * (Lp1 + z * (Lp2 + z * (Lp3 + z * (Lp4 + z * (Lp5 + z * (Lp6 + z * Lp7))))));
if (k == 0) return f - (hfsq - s * (hfsq + R));
return static_cast<float>(k) * Ln2High - ((hfsq - (s * (hfsq + R) + (static_cast<float>(k) * Ln2Low + c))) - f);
}
float APS5_VABI log1pf_nid_postfix(float x) {
if (!std::isfinite(x) || x <= -1.0f) return std::log1p(x);
return Log1pfMsun(x);
}
static double Expm1(double x) {
const double tiny = 1.0e-300;
const double o_threshold = 7.09782712893383973096e+02;
Expand Down Expand Up @@ -2164,7 +2243,6 @@ float APS5_VABI expm1f_nid_postfix(float x) {
}
return result;
}
float APS5_VABI erff_nid_postfix(float x) { return std::erf(x); }
/* Adapted from FreeBSD release/11.4.0 lib/msun/src/s_erf.c: https://github.com/freebsd/freebsd-src/blob/release/11.4.0/lib/msun/src/s_erf.c */
/*
* ====================================================
Expand Down Expand Up @@ -2294,7 +2372,6 @@ double APS5_VABI erfc_nid_postfix(double x) {
const double r = ErfTail(magnitude, ix < 0x4006db6d);
return hx > 0 ? r / magnitude : 2.0 - r / magnitude;
}
float APS5_VABI erfcf_nid_postfix(float x) { return std::erfc(x); }
int signgam_nid_postfix = 0;

static double LgammaMsun(double x);
Expand Down Expand Up @@ -4623,10 +4700,109 @@ double APS5_VABI __powidf2_nid_postfix(double base, int exponent) {
}
return reciprocal ? 1.0 / result : result;
}
float APS5_VABI expf_nid_postfix(float x) {
const float result = std::exp(x);
if (std::isfinite(x) && (std::isinf(result) || result == 0.0f)) errno = ERANGE;
return result;
/* Adapted from FreeBSD 59bc2f095289a10b8cfa55cbb2b45c3bd6c2d4ae lib/msun/src/s_erff.c: https://github.com/freebsd/freebsd-src/blob/59bc2f095289a10b8cfa55cbb2b45c3bd6c2d4ae/lib/msun/src/s_erff.c */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
static float ErffSmallRatio(float z) {
const float r = 1.2837916613e-01f + z * (-3.2504209876e-01f + z * (-2.8481749818e-02f + z * (-5.7702702470e-03f + z * -2.3763017452e-05f)));
const float s = 1.0f + z * (3.9791721106e-01f + z * (6.5022252500e-02f + z * (5.0813062117e-03f + z * (1.3249473704e-04f + z * -3.9602282413e-06f))));
return r / s;
}

static float ErffNearOneRatio(float s) {
const float p = -2.3621185683e-03f + s * (4.1485610604e-01f + s * (-3.7220788002e-01f + s * (3.1834661961e-01f + s * (-1.1089469492e-01f + s * (3.5478305072e-02f + s * -2.1663755178e-03f)))));
const float q = 1.0f + s * (1.0642088205e-01f + s * (5.4039794207e-01f + s * (7.1828655899e-02f + s * (1.2617121637e-01f + s * (1.3637083583e-02f + s * 1.1984500103e-02f)))));
return p / q;
}

static float ErffTail(float x, bool nearSplit) {
const float s = 1.0f / (x * x);
float r;
float t;
if (nearSplit) {
r = -9.8649440333e-03f + s * (-6.9385856390e-01f + s * (-1.0558626175e+01f + s * (-6.2375331879e+01f + s * (-1.6239666748e+02f + s * (-1.8460508728e+02f + s * (-8.1287437439e+01f + s * -9.8143291473e+00f))))));
t = 1.0f + s * (1.9651271820e+01f + s * (1.3765776062e+02f + s * (4.3456588745e+02f + s * (6.4538726807e+02f + s * (4.2900814819e+02f + s * (1.0863500214e+02f + s * (6.5702495575e+00f + s * -6.0424413532e-02f)))))));
} else {
r = -9.8649431020e-03f + s * (-7.9928326607e-01f + s * (-1.7757955551e+01f + s * (-1.6063638306e+02f + s * (-6.3756646729e+02f + s * (-1.0250950928e+03f + s * -4.8351919556e+02f)))));
t = 1.0f + s * (3.0338060379e+01f + s * (3.2579251099e+02f + s * (1.5367296143e+03f + s * (3.1998581543e+03f + s * (2.5530502930e+03f + s * (4.7452853394e+02f + s * -2.2440952301e+01f))))));
}
const float z = std::bit_cast<float>(std::bit_cast<std::uint32_t>(x) & 0xfffff000u);
return expf_nid_postfix(-z * z - 0.5625f) * expf_nid_postfix((z - x) * (z + x) + r / t);
}

float APS5_VABI erff_nid_postfix(float x) {
constexpr float erx = 8.4506291151e-01f;
constexpr float tiny = 1e-30f;
const std::int32_t hx = std::bit_cast<std::int32_t>(x);
const std::int32_t ix = hx & 0x7fffffff;
if (ix >= 0x7f800000) {
return static_cast<float>(1 - static_cast<std::int32_t>((static_cast<std::uint32_t>(hx) >> 31) << 1)) + 1.0f / x;
}
if (ix < 0x3f580000) {
if (ix < 0x31800000) {
if (ix < 0x04000000) {
return 0.125f * (8.0f * x + 1.0270333290e+00f * x);
}
return x + 1.2837916613e-01f * x;
}
return x + x * ErffSmallRatio(x * x);
}
if (ix < 0x3fa00000) {
const float ratio = ErffNearOneRatio(std::fabs(x) - 1.0f);
return hx >= 0 ? erx + ratio : -erx - ratio;
}
if (ix >= 0x40c00000) {
return hx >= 0 ? 1.0f - tiny : tiny - 1.0f;
}
const float magnitude = std::fabs(x);
const float r = ErffTail(magnitude, ix < 0x4036db6e);
return hx >= 0 ? 1.0f - r / magnitude : r / magnitude - 1.0f;
}

float APS5_VABI erfcf_nid_postfix(float x) {
constexpr float erx = 8.4506291151e-01f;
constexpr float tiny = 1e-30f;
const std::int32_t hx = std::bit_cast<std::int32_t>(x);
const std::int32_t ix = hx & 0x7fffffff;
if (ix >= 0x7f800000) {
return static_cast<float>((static_cast<std::uint32_t>(hx) >> 31) << 1) + 1.0f / x;
}
if (ix < 0x3f580000) {
if (ix < 0x23800000) {
return 1.0f - x;
}
const float y = ErffSmallRatio(x * x);
if (hx < 0x3e800000) {
return 1.0f - (x + x * y);
}
float r = x * y;
r += x - 0.5f;
return 0.5f - r;
}
if (ix < 0x3fa00000) {
const float ratio = ErffNearOneRatio(std::fabs(x) - 1.0f);
if (hx >= 0) {
return (1.0f - erx) - ratio;
}
return 1.0f + (erx + ratio);
}
if (ix >= 0x41e00000) {
return hx > 0 ? tiny * tiny : 2.0f - tiny;
}
if (hx < 0 && ix >= 0x40c00000) {
return 2.0f - tiny;
}
const float magnitude = std::fabs(x);
const float r = ErffTail(magnitude, ix < 0x4036db6d);
return hx > 0 ? r / magnitude : 2.0f - r / magnitude;
}
static float LogfMsun(float x, bool fused) {
const float ln2_hi = static_cast<float>(6.9313812256e-01);
Expand Down
85 changes: 85 additions & 0 deletions core/libs/prx/libc/src/MathExpf.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/* Adapted from FreeBSD msun e_expf.c: https://github.com/freebsd/freebsd-src/blob/8c639945a44588f6cfdddfb057bb5aad88735da0/lib/msun/src/e_expf.c */
/* Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/

#include "prx/libc/include/Api.hpp"
#include <bit>
#include <cstdint>
#include <limits>

extern "C" {

float APS5_VABI expf_nid_postfix(float x) {
static constexpr float halF[2] = {0.5f, -0.5f};
static constexpr float ln2HI[2] = {0x1.62e4000000000p-1f, -0x1.62e4000000000p-1f};
static constexpr float ln2LO[2] = {0x1.7f7d1c0000000p-20f, -0x1.7f7d1c0000000p-20f};
static volatile float huge = 0x1.93e5940000000p+99f;
static volatile float twom100 = 0x1.0000000000000p-100f;
const float invln2 = 0x1.7154760000000p+0f;
const float P1 = 0x1.55551e0000000p-3f;
const float P2 = -0x1.6aa42a0000000p-9f;
float hi = 0.0f;
float lo = 0.0f;
std::int32_t k = 0;
std::uint32_t hx = std::bit_cast<std::uint32_t>(x);
const std::int32_t xsb = (hx >> 31) & 1;
hx &= 0x7fffffff;
if (hx >= 0x42b17218) {
if (hx > 0x7f800000) {
return x + x;
}
if (hx == 0x7f800000) {
return xsb == 0 ? x : 0.0f;
}
if (x > 0x1.62e3000000000p+6f) {
_Feraise_nid_postfix(0x08);
return std::numeric_limits<float>::infinity();
}
if (x < -0x1.9fe36a0000000p+6f) {
_Feraise_nid_postfix(0x10);
return twom100 * twom100;
}
}
if (x == 1.0f) return 0x1.5bf0a8p+1f;
if (hx > 0x3eb17218) {
if (hx < 0x3f851592) {
hi = x - ln2HI[xsb];
lo = ln2LO[xsb];
k = 1 - xsb - xsb;
} else {
k = static_cast<std::int32_t>(invln2 * x + halF[xsb]);
const float t = static_cast<float>(k);
hi = x - t * ln2HI[0];
lo = t * ln2LO[0];
}
x = hi - lo;
} else {
const volatile float trigger = huge + x;
if (trigger > 1.0f && hx < 0x39000000) return 1.0f + x;
}
const float t = x * x;
const float twopk = std::bit_cast<float>(static_cast<std::uint32_t>(0x7f + (k >= -125 ? k : k + 100)) << 23);
const float c = x - t * (P1 + t * P2);
if (k == 0) {
return 1.0f + (x - (x * c) / (c - 2.0f));
}
const float y = 1.0f + (hi - (lo - (x * c) / (2.0f - c)));
if (k >= -125) {
if (k == 128) {
return (y + y) * 0x1p127f;
}
return y * twopk;
}
return y * twopk * twom100;
}

}
12 changes: 12 additions & 0 deletions core/libs/prx/libc/tests/cmake/guest_erf_tests.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if(BUILD_TESTING)
add_test_executable(guest_erf_tests ${LIBS_INCLUDE_DIR}/tests/GuestErf.cpp)
target_include_directories(guest_erf_tests PRIVATE ${LIBS_INCLUDE_DIR})
target_link_libraries(guest_erf_tests PRIVATE libc)
configure_windows_unwind(guest_erf_tests)
add_test(NAME guest_erff COMMAND guest_erf_tests erff)
add_test(NAME guest_erfcf COMMAND guest_erf_tests erfcf)
set_tests_properties(guest_erff guest_erfcf PROPERTIES TIMEOUT 30)
if(WIN32)
set_tests_properties(guest_erff guest_erfcf PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
endif()
endif()
11 changes: 11 additions & 0 deletions core/libs/prx/libc/tests/cmake/guest_expf_environment.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if(BUILD_TESTING)
add_test_executable(guest_expf_environment_tests ${LIBS_INCLUDE_DIR}/tests/GuestExpfEnvironment.cpp)
target_include_directories(guest_expf_environment_tests PRIVATE ${LIBS_INCLUDE_DIR})
target_link_libraries(guest_expf_environment_tests PRIVATE libc)
configure_windows_unwind(guest_expf_environment_tests)
add_test(NAME guest_expf_environment COMMAND guest_expf_environment_tests)
set_tests_properties(guest_expf_environment PROPERTIES TIMEOUT 30)
if(WIN32)
set_tests_properties(guest_expf_environment PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
endif()
endif()
Loading
Loading