Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
028b1c2
Move math PAL that redefined functions to handle boundary conditions …
jkoritzinsky Feb 6, 2024
e5b1ae6
Use netintrinsics in mono codegen/interp backends
jkoritzinsky Feb 6, 2024
3fc672d
Update NativeAOT to use the netintrinsics APIs as well
jkoritzinsky Feb 6, 2024
c3afdce
Remove unused defines
jkoritzinsky Feb 6, 2024
ab98412
Remove now-duplicate configure steps
jkoritzinsky Feb 6, 2024
a501838
Add back default debug channel
jkoritzinsky Feb 6, 2024
9d45460
Fix macro name
jkoritzinsky Feb 6, 2024
f2b0cad
Add sincos to PAL headers on Apple platforms
jkoritzinsky Feb 6, 2024
cf4b2d3
Move ilogb intrinsic handling into RyuJIT (as we still need this one …
jkoritzinsky Feb 6, 2024
f519041
Remove _isnan
jkoritzinsky Feb 6, 2024
2c842df
Remove _copysign from the PAL
jkoritzinsky Feb 7, 2024
267e6e1
Remove _finite from the PAL and delete the now-empty math.cpp
jkoritzinsky Feb 7, 2024
c7a561f
Fix isfinite implementation
jkoritzinsky Feb 7, 2024
cc7ab05
Merge branch 'main' of github.com:dotnet/runtime into math-pal
jkoritzinsky Feb 7, 2024
6f5f524
Revert changes to Mono
jkoritzinsky Feb 7, 2024
6ffc62b
Change the native isFinite implementation to use the same implementat…
jkoritzinsky Feb 8, 2024
34adfb1
Apparently we don't have the PAL/standard overloads available here. D…
jkoritzinsky Feb 9, 2024
92bb263
Fix formatting
jkoritzinsky Feb 9, 2024
874ff56
Merge branch 'math-pal' of github.com:jkoritzinsky/runtime into math-pal
jkoritzinsky Feb 10, 2024
1b39abb
Remove now-unneceesary tryrun.cmake statements
jkoritzinsky Feb 10, 2024
8f7e09a
Merge branch 'main' of github.com:dotnet/runtime into math-pal
jkoritzinsky Feb 10, 2024
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
Prev Previous commit
Next Next commit
Remove now-duplicate configure steps
  • Loading branch information
jkoritzinsky committed Feb 6, 2024
commit ab98412a42bf6ad742d5f90ff4f5c0b5805ff04a
11 changes: 0 additions & 11 deletions src/coreclr/pal/src/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,6 @@
#cmakedefine01 SEM_INIT_MODIFIES_ERRNO
#cmakedefine01 HAVE_PROCFS_CTL
#cmakedefine01 HAVE_PROCFS_STAT
#cmakedefine01 HAVE_COMPATIBLE_ACOS
#cmakedefine01 HAVE_COMPATIBLE_ASIN
#cmakedefine01 HAVE_COMPATIBLE_POW
#cmakedefine01 HAVE_VALID_NEGATIVE_INF_POW
#cmakedefine01 HAVE_VALID_POSITIVE_INF_POW
#cmakedefine01 HAVE_COMPATIBLE_ATAN2
#cmakedefine01 HAVE_COMPATIBLE_EXP
#cmakedefine01 HAVE_COMPATIBLE_ILOGB0
#cmakedefine01 HAVE_COMPATIBLE_ILOGBNAN
#cmakedefine01 HAVE_COMPATIBLE_LOG
#cmakedefine01 HAVE_COMPATIBLE_LOG10
#cmakedefine01 UNGETC_NOT_RETURN_EOF
#cmakedefine01 HAS_POSIX_SEMAPHORES
#cmakedefine01 FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL
Expand Down
208 changes: 0 additions & 208 deletions src/coreclr/pal/src/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -644,214 +644,6 @@ int main(void) {
exit(0);
}" HAVE_PROCFS_STAT)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES m)
check_cxx_source_runs("
#include <math.h>
#include <stdlib.h>

int main(void) {
volatile double x = 10;
if (!isnan(acos(x))) {
exit(1);
}
exit(0);
}" HAVE_COMPATIBLE_ACOS)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES m)
check_cxx_source_runs("
#include <math.h>
#include <stdlib.h>

int main(void) {
volatile double arg = 10;
if (!isnan(asin(arg))) {
exit(1);
}
exit(0);
}" HAVE_COMPATIBLE_ASIN)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES m)
check_cxx_source_runs("
#include <math.h>
#include <stdlib.h>

int main(void) {
volatile double base = 1.0;
volatile double infinity = 1.0 / 0.0;
if (pow(base, infinity) != 1.0 || pow(base, -infinity) != 1.0) {
exit(1);
}
if (pow(-base, infinity) != 1.0 || pow(-base, -infinity) != 1.0) {
exit(1);
}

base = 0.0;
if (pow(base, infinity) != 0.0) {
exit(1);
}
if (pow(base, -infinity) != infinity) {
exit(1);
}

base = 1.1;
if (pow(-base, infinity) != infinity || pow(base, infinity) != infinity) {
exit(1);
}
if (pow(-base, -infinity) != 0.0 || pow(base, -infinity) != 0.0) {
exit(1);
}

base = 0.0;
volatile int iexp = 1;
if (pow(-base, -iexp) != -infinity) {
exit(1);
}
if (pow(base, -iexp) != infinity) {
exit(1);
}
exit(0);
}" HAVE_COMPATIBLE_POW)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES m)
check_cxx_source_runs("
#include <math.h>
#include <stdlib.h>

int main(int argc, char **argv) {
double result;
volatile double base = 3.2e-10;
volatile double exp = 1 - 5e14;

result = pow(-base, exp);
if (result != -1.0 / 0.0) {
exit(1);
}
exit(0);
}" HAVE_VALID_NEGATIVE_INF_POW)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES m)
check_cxx_source_runs("
#include <math.h>
#include <stdlib.h>

int main(int argc, char **argv) {
double result;
volatile double base = 3.5;
volatile double exp = 3e100;

result = pow(-base, exp);
if (result != 1.0 / 0.0) {
exit(1);
}
exit(0);
}" HAVE_VALID_POSITIVE_INF_POW)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES m)
check_cxx_source_runs("
#include <math.h>
#include <stdlib.h>

int main(void) {
double pi = 3.14159265358979323846;
double result;
volatile double y = 0.0;
volatile double x = 0.0;

result = atan2(y, -x);
if (fabs(pi - result) > 0.0000001) {
exit(1);
}

result = atan2(-y, -x);
if (fabs(-pi - result) > 0.0000001) {
exit(1);
}

result = atan2 (-y, x);
if (result != 0.0 || copysign (1.0, result) > 0) {
exit(1);
}

result = atan2 (y, x);
if (result != 0.0 || copysign (1.0, result) < 0) {
exit(1);
}

exit (0);
}" HAVE_COMPATIBLE_ATAN2)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES m)
check_cxx_source_runs("
#include <math.h>
#include <stdlib.h>

int main(void) {
double d = exp(1.0), e = M_E;

/* Used memcmp rather than == to test that the doubles are equal to
prevent gcc's optimizer from using its 80 bit internal long
doubles. If you use ==, then on BSD you get a false negative since
exp(1.0) == M_E to 64 bits, but not 80.
*/

if (memcmp (&d, &e, sizeof (double)) == 0) {
exit(0);
}
exit(1);
}" HAVE_COMPATIBLE_EXP)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES m)
check_cxx_source_runs("
#include <math.h>
#include <stdlib.h>

int main(void) {
if (FP_ILOGB0 != -2147483648) {
exit(1);
}

exit(0);
}" HAVE_COMPATIBLE_ILOGB0)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES m)
check_cxx_source_runs("
#include <math.h>
#include <stdlib.h>

int main(void) {
if (FP_ILOGBNAN != 2147483647) {
exit(1);
}

exit(0);
}" HAVE_COMPATIBLE_ILOGBNAN)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES m)
check_cxx_source_runs("
#include <math.h>
#include <stdlib.h>

int main(void) {
volatile int arg = 10000;
if (!isnan(log(-arg))) {
exit(1);
}
exit(0);
}" HAVE_COMPATIBLE_LOG)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES m)
check_cxx_source_runs("
#include <math.h>
#include <stdlib.h>

int main(void) {
volatile int arg = 10000;
if (!isnan(log10(-arg))) {
exit(1);
}
exit(0);
}" HAVE_COMPATIBLE_LOG10)
set(CMAKE_REQUIRED_LIBRARIES)
check_cxx_source_runs("
#include <stdio.h>
#include <stdlib.h>
Expand Down