More PPC/AIX regression fixes (#13264)
commit2ecf08d26548437bb20be6f969ca150c19c4a98b
authorCalvin Buckley <calvin@cmpct.info>
Sat, 2 Mar 2019 11:43:12 +0000 (2 07:43 -0400)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Sat, 2 Mar 2019 11:43:12 +0000 (2 12:43 +0100)
tree05b92b54c0f78796b5489ad889bb02bf8e60bce2
parent30d70e98e66af943f71b9d6e9daba1ae06c45891
More PPC/AIX regression fixes (#13264)

* Fix System.Math regressions brought on by PowerPC JIT optimizations

* While frin[.] does do rounding, the semantics are slightly
  different enough from the BCL that it subtly breaks, as
  seen by some tests. Ceil/Floor/Trunc are fine, however.
  Perhaps the sysmath.c version can be translated to asma.

* Fix typo where signed long comparison for isel was using
  an unsigned comparison.
  Add a test for this in the JIT regression check.

* Link against (not fd.o) libbsd for System.Native on AIX

The way we link the library by default will allow some unresolved
symbols. These will get resolved to the runtime when loaded by it.
However, flock isn't in AIX libc, and the native library needs it.
This doesn't seem to be a problem on AIX, but on i libbsd doesn't
seem to be in the dependency chain, so it errors out when you use
it. The workaround is to link libbsd (not the freedesktop.org one)
into the library. According to dump, it seems it has its own copy
of ioctl and fnctl, but they seem benign according to objdump and
don't seem to affect System and corlib tests I've ran to check it.
configure.ac
mono/mini/basic-math.cs
mono/mini/mini-ppc.c