Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/coreclr/src/jit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ else()
elseif(CLR_CMAKE_HOST_SUNOS)
# Add linker exports file option
set(JIT_EXPORTS_LINKER_OPTION -Wl,-M,${JIT_EXPORTS_FILE})
endif(CLR_CMAKE_HOST_SUNOS)
endif()

set(SHARED_LIB_SOURCES ${SOURCES})
endif()
Expand Down
56 changes: 37 additions & 19 deletions src/coreclr/src/pal/src/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,8 @@ check_cxx_source_runs("
#include <stdlib.h>

int main(void) {
if (!isnan(acos(10))) {
volatile double x = 10;
if (!isnan(acos(x))) {
exit(1);
}
exit(0);
Expand All @@ -746,7 +747,8 @@ check_cxx_source_runs("
#include <stdlib.h>

int main(void) {
if (!isnan(asin(10))) {
volatile double arg = 10;
if (!isnan(asin(arg))) {
exit(1);
}
exit(0);
Expand All @@ -758,29 +760,37 @@ check_cxx_source_runs("
#include <stdlib.h>

int main(void) {
double infinity = 1.0 / 0.0;
if (pow(1.0, infinity) != 1.0 || pow(1.0, -infinity) != 1.0) {
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(-1.0, infinity) != 1.0 || pow(-1.0, -infinity) != 1.0) {
if (pow(-base, infinity) != 1.0 || pow(-base, -infinity) != 1.0) {
exit(1);
}
if (pow(0.0, infinity) != 0.0) {

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

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

base = 0.0;
volatile int iexp = 1;
if (pow(-base, -iexp) != -infinity) {
exit(1);
}
if (pow(0.0, -1) != infinity) {
if (pow(base, -iexp) != infinity) {
exit(1);
}
exit(0);
Expand All @@ -793,8 +803,10 @@ check_cxx_source_runs("

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

result = pow(-3.2e-10, -5e14 + 1);
result = pow(-base, exp);
if (result != -1.0 / 0.0) {
exit(1);
}
Expand All @@ -808,8 +820,10 @@ check_cxx_source_runs("

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

result = pow(-3.5, 3e100);
result = pow(-base, exp);
if (result != 1.0 / 0.0) {
exit(1);
}
Expand All @@ -824,23 +838,25 @@ check_cxx_source_runs("
int main(void) {
double pi = 3.14159265358979323846;
double result;
volatile double y = 0.0;
volatile double x = 0.0;

result = atan2(0.0, -0.0);
result = atan2(y, -x);
Comment thread
am11 marked this conversation as resolved.
if (fabs(pi - result) > 0.0000001) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (and others checking against a "close enough" result) should ideally get cleaned up as well. IEEE floating-point is deterministic, if nothing else, and so the result should be exactly Math.PI (which is the nearest representation of "true pi").
I'll log a bug and see about following up after this gets merged.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logged #35341

exit(1);
}

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

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

result = atan2 (0.0, 0.0);
result = atan2 (y, x);
if (result != 0.0 || copysign (1.0, result) < 0) {
exit(1);
}
Expand Down Expand Up @@ -900,7 +916,8 @@ check_cxx_source_runs("
#include <stdlib.h>

int main(void) {
if (!isnan(log(-10000))) {
volatile int arg = 10000;
if (!isnan(log(-arg))) {
exit(1);
}
exit(0);
Expand All @@ -912,7 +929,8 @@ check_cxx_source_runs("
#include <stdlib.h>

int main(void) {
if (!isnan(log10(-10000))) {
volatile int arg = 10000;
if (!isnan(log10(-arg))) {
exit(1);
}
exit(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ endif(CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_FREEBSD OR CLR_CMAKE_TARGET_NET

if(CLR_CMAKE_TARGET_OSX)
set(EXPORTS_LINKER_OPTION1 -Wl,-exported_symbols_list,${EXPORTS_FILE1})
endif(CLR_CMAKE_HOST_OSX)
endif(CLR_CMAKE_TARGET_OSX)

if(CLR_CMAKE_HOST_SUNOS)
# Add linker exports file option
Expand Down