Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src [v4]

2022-10-11 Thread Aleksey Shipilev
On Wed, 12 Oct 2022 01:25:22 GMT, Dingli Zhang wrote: >> I built hsdis with the following parameters from source code of binutils >> while cross-compiling: >> >> --with-hsdis=binutils \ >> --with-binutils-src=/home/dingli/jdk-tools/binutils-2.38 >> >> >> But configure will exit with the follo

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src [v4]

2022-10-11 Thread Magnus Ihse Bursie
On Wed, 12 Oct 2022 01:25:22 GMT, Dingli Zhang wrote: >> I built hsdis with the following parameters from source code of binutils >> while cross-compiling: >> >> --with-hsdis=binutils \ >> --with-binutils-src=/home/dingli/jdk-tools/binutils-2.38 >> >> >> But configure will exit with the follo

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src

2022-10-11 Thread Dingli Zhang
On Tue, 11 Oct 2022 12:57:28 GMT, Aleksey Shipilev wrote: >> Ok, we already have an exported value for `$host`, which is >> `$OPENJDK_TARGET_AUTOCONF_NAME`. Also, `$conf_openjdk_target` is used in the >> wrapper configure script. It is probably leaking into the main generated >> autoconf scrip

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src [v4]

2022-10-11 Thread Dingli Zhang
> I built hsdis with the following parameters from source code of binutils > while cross-compiling: > > --with-hsdis=binutils \ > --with-binutils-src=/home/dingli/jdk-tools/binutils-2.38 > > > But configure will exit with the following error: > > checking whether we are cross compiling... conf

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src [v3]

2022-10-11 Thread Dingli Zhang
> I built hsdis with the following parameters from source code of binutils > while cross-compiling: > > --with-hsdis=binutils \ > --with-binutils-src=/home/dingli/jdk-tools/binutils-2.38 > > > But configure will exit with the following error: > > checking whether we are cross compiling... conf

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src [v2]

2022-10-11 Thread Dingli Zhang
> I built hsdis with the following parameters from source code of binutils > while cross-compiling: > > --with-hsdis=binutils \ > --with-binutils-src=/home/dingli/jdk-tools/binutils-2.38 > > > But configure will exit with the following error: > > checking whether we are cross compiling... conf

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic

2022-10-11 Thread David Holmes
On Tue, 11 Oct 2022 16:02:41 GMT, Andrew Haley wrote: > A bug in GCC causes shared libraries linked with -ffast-math to disable > denormal arithmetic. This breaks Java's floating-point semantics. > > The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 > > One solution is to save and

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic

2022-10-11 Thread David Holmes
On Tue, 11 Oct 2022 16:02:41 GMT, Andrew Haley wrote: > A bug in GCC causes shared libraries linked with -ffast-math to disable > denormal arithmetic. This breaks Java's floating-point semantics. > > The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 > > One solution is to save and

Re: RFR: 8294594: Fix cast-function-type warnings in signal handling code [v2]

2022-10-11 Thread David Holmes
On Mon, 10 Oct 2022 12:32:39 GMT, Aleksey Shipilev wrote: >> After [JDK-8294314](https://bugs.openjdk.org/browse/JDK-8294314), we would >> have signals_posix.cpp excluded with cast-function-type warning: > > Aleksey Shipilev has updated the pull request with a new target base due to a > merge o

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic

2022-10-11 Thread Daniel D . Daugherty
On Tue, 11 Oct 2022 16:02:41 GMT, Andrew Haley wrote: > A bug in GCC causes shared libraries linked with -ffast-math to disable > denormal arithmetic. This breaks Java's floating-point semantics. > > The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 > > One solution is to save and

Re: RFR: 8295070: Introduce more target combinations for compiler flags [v3]

2022-10-11 Thread Magnus Ihse Bursie
On Mon, 10 Oct 2022 15:29:16 GMT, Julian Waters wrote: >> Several parts of the make system in the JDK has large parts of cluttered if >> branches dedicated to setting flags for the specific compiler used in the >> build. This could be more neatly accomplished by instead adding more target >> c

Re: RFR: 8294997: Improve ECC math operations

2022-10-11 Thread Xue-Lei Andrew Fan
On Fri, 7 Oct 2022 21:11:39 GMT, Daniel Jeliński wrote: > This patch rewrites some BigInteger and curve point operations used in EC > calculations: > - coefficient * 2^power is equivalent to coefficient << power > - number mod 2^n is equivalent to number & (2^n-1) > - pair of IntegerModuloP oper

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic

2022-10-11 Thread Andrew Haley
On Tue, 11 Oct 2022 16:02:41 GMT, Andrew Haley wrote: > A bug in GCC causes shared libraries linked with -ffast-math to disable > denormal arithmetic. This breaks Java's floating-point semantics. > > The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 > > One solution is to save and

RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic

2022-10-11 Thread Andrew Haley
A bug in GCC causes shared libraries linked with -ffast-math to disable denormal arithmetic. This breaks Java's floating-point semantics. The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 One solution is to save and restore the floating-point control word around System.loadLibrary()

Re: RFR: 8295070: Introduce more target combinations for compiler flags [v3]

2022-10-11 Thread Julian Waters
On Mon, 10 Oct 2022 17:38:57 GMT, Erik Joelsson wrote: > I think this looks good, but if Magnus is around to comment I would value his > input. I understand, @magicus would this be a reasonable change? - PR: https://git.openjdk.org/jdk/pull/10634

Integrated: 8295163: Remove old hsdis Makefile

2022-10-11 Thread Magnus Ihse Bursie
On Tue, 11 Oct 2022 16:00:38 GMT, Magnus Ihse Bursie wrote: > For some reason the old Makefile for hsdis was not removed when the build was > moved into the normal build system in > [JDK-8188073](https://bugs.openjdk.org/browse/JDK-8188073). This should be > fixed. This pull request has now b

Re: RFR: 8295163: Remove old hsdis Makefile

2022-10-11 Thread Iris Clark
On Tue, 11 Oct 2022 16:00:38 GMT, Magnus Ihse Bursie wrote: > For some reason the old Makefile for hsdis was not removed when the build was > moved into the normal build system in > [JDK-8188073](https://bugs.openjdk.org/browse/JDK-8188073). This should be > fixed. Marked as reviewed by iris

Re: RFR: 8294997: Improve ECC math operations

2022-10-11 Thread Ferenc Rakoczi
On Fri, 7 Oct 2022 21:11:39 GMT, Daniel Jeliński wrote: > This patch rewrites some BigInteger and curve point operations used in EC > calculations: > - coefficient * 2^power is equivalent to coefficient << power > - number mod 2^n is equivalent to number & (2^n-1) > - pair of IntegerModuloP oper

Re: RFR: 8295163: Remove old hsdis Makefile

2022-10-11 Thread Aleksey Shipilev
On Tue, 11 Oct 2022 16:00:38 GMT, Magnus Ihse Bursie wrote: > For some reason the old Makefile for hsdis was not removed when the build was > moved into the normal build system in > [JDK-8188073](https://bugs.openjdk.org/browse/JDK-8188073). This should be > fixed. Marked as reviewed by shade

RFR: 8295163: Remove old hsdis Makefile

2022-10-11 Thread Magnus Ihse Bursie
For some reason the old Makefile for hsdis was not removed when the build was moved into the normal build system in [JDK-8188073](https://bugs.openjdk.org/browse/JDK-8188073). This should be fixed. - Commit messages: - 8295163: Remove old hsdis Makefile Changes: https://git.openj

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src

2022-10-11 Thread Magnus Ihse Bursie
On Mon, 10 Oct 2022 06:32:09 GMT, Dingli Zhang wrote: > I built hsdis with the following parameters from source code of binutils > while cross-compiling: > > --with-hsdis=binutils \ > --with-binutils-src=/home/dingli/jdk-tools/binutils-2.38 > > > But configure will exit with the following err

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src

2022-10-11 Thread Magnus Ihse Bursie
On Mon, 10 Oct 2022 06:32:09 GMT, Dingli Zhang wrote: > I built hsdis with the following parameters from source code of binutils > while cross-compiling: > > --with-hsdis=binutils \ > --with-binutils-src=/home/dingli/jdk-tools/binutils-2.38 > > > But configure will exit with the following err

Re: RFR: 8294594: Fix cast-function-type warnings in signal handling code [v2]

2022-10-11 Thread Aleksey Shipilev
On Tue, 11 Oct 2022 08:37:59 GMT, Aleksey Shipilev wrote: >>> > > Fix looks good as far as it goes (can't believe I didn't see what was >>> > > going on here!) - but `os::signal` is still broken as it uses >>> > > `sa_handler` instead of `sa_sigaction`. >>> > >>> > >>> > Yikes! I think this c

Re: RFR: 8294594: Fix cast-function-type warnings in signal handling code [v2]

2022-10-11 Thread David Holmes
On Mon, 10 Oct 2022 12:32:39 GMT, Aleksey Shipilev wrote: >> After [JDK-8294314](https://bugs.openjdk.org/browse/JDK-8294314), we would >> have signals_posix.cpp excluded with cast-function-type warning: > > Aleksey Shipilev has updated the pull request with a new target base due to a > merge o

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src

2022-10-11 Thread Aleksey Shipilev
On Tue, 11 Oct 2022 11:38:02 GMT, Magnus Ihse Bursie wrote: > Ok, we already have an exported value for `$host`, which is > `$OPENJDK_TARGET_AUTOCONF_NAME`. Also, `$conf_openjdk_target` is used in the > wrapper configure script. It is probably leaking into the main generated > autoconf script,

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src

2022-10-11 Thread Magnus Ihse Bursie
On Mon, 10 Oct 2022 06:32:09 GMT, Dingli Zhang wrote: > I built hsdis with the following parameters from source code of binutils > while cross-compiling: > > --with-hsdis=binutils \ > --with-binutils-src=/home/dingli/jdk-tools/binutils-2.38 > > > But configure will exit with the following err

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src

2022-10-11 Thread Magnus Ihse Bursie
On Tue, 11 Oct 2022 10:09:02 GMT, Aleksey Shipilev wrote: > I think checking it like this would be more robust? > > ``` > if test "x$conf_openjdk_target" != "x"; then > binutils_target="--host=$conf_openjdk_target" > else > binutils_target="" > fi > ``` > > Thi

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src

2022-10-11 Thread Magnus Ihse Bursie
On Mon, 10 Oct 2022 06:32:09 GMT, Dingli Zhang wrote: > I built hsdis with the following parameters from source code of binutils > while cross-compiling: > > --with-hsdis=binutils \ > --with-binutils-src=/home/dingli/jdk-tools/binutils-2.38 > > > But configure will exit with the following err

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src

2022-10-11 Thread Aleksey Shipilev
On Tue, 11 Oct 2022 10:41:07 GMT, Aleksey Shipilev wrote: > This allows building hsdis on following arches with server ports: Also these Zero ports produce `hsdis` binaries as well (they are not as useful there, though, because no JIT compilers are done there): alpha-linux-gnu arm-linux-gnuea

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src

2022-10-11 Thread Magnus Ihse Bursie
On Mon, 10 Oct 2022 06:32:09 GMT, Dingli Zhang wrote: > I built hsdis with the following parameters from source code of binutils > while cross-compiling: > > --with-hsdis=binutils \ > --with-binutils-src=/home/dingli/jdk-tools/binutils-2.38 > > > But configure will exit with the following err

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src

2022-10-11 Thread Aleksey Shipilev
On Tue, 11 Oct 2022 10:09:02 GMT, Aleksey Shipilev wrote: > I think checking it like this would be more robust? > > ``` > if test "x$conf_openjdk_target" != "x"; then > binutils_target="--host=$conf_openjdk_target" > else > binutils_target="" > fi > ``` Also ne

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src

2022-10-11 Thread Aleksey Shipilev
On Mon, 10 Oct 2022 06:32:09 GMT, Dingli Zhang wrote: > I built hsdis with the following parameters from source code of binutils > while cross-compiling: > > --with-hsdis=binutils \ > --with-binutils-src=/home/dingli/jdk-tools/binutils-2.38 > > > But configure will exit with the following err

Re: RFR: 8295033: hsdis configure error when cross-compiling with --with-binutils-src

2022-10-11 Thread Aleksey Shipilev
On Mon, 10 Oct 2022 06:32:09 GMT, Dingli Zhang wrote: > I built hsdis with the following parameters from source code of binutils > while cross-compiling: > > --with-hsdis=binutils \ > --with-binutils-src=/home/dingli/jdk-tools/binutils-2.38 > > > But configure will exit with the following err

Re: RFR: 8294594: Fix cast-function-type warnings in signal handling code [v2]

2022-10-11 Thread Kim Barrett
On Tue, 11 Oct 2022 08:54:42 GMT, Kim Barrett wrote: > > > For POSIX we expect the handler argument for os::signal to be a sigaction > > > handler (taking 3 arguments). For Windows we expect os::signal to take a > > > 1 argument handler, since Windows seemingly doesn't support the sigaction >

Re: RFR: 8294594: Fix cast-function-type warnings in signal handling code [v2]

2022-10-11 Thread Kim Barrett
On Tue, 11 Oct 2022 08:37:59 GMT, Aleksey Shipilev wrote: > > For POSIX we expect the handler argument for os::signal to be a sigaction > > handler (taking 3 arguments). For Windows we expect os::signal to take a 1 > > argument handler, since Windows seemingly doesn't support the sigaction > >

Re: RFR: 8294594: Fix cast-function-type warnings in signal handling code [v2]

2022-10-11 Thread Aleksey Shipilev
On Tue, 11 Oct 2022 08:28:48 GMT, Kim Barrett wrote: > For POSIX we expect the handler argument for os::signal to be a sigaction > handler (taking 3 arguments). For Windows we expect os::signal to take a 1 > argument handler, since Windows seemingly doesn't support the sigaction > stuff. How i

Re: RFR: 8294594: Fix cast-function-type warnings in signal handling code [v2]

2022-10-11 Thread Kim Barrett
On Tue, 11 Oct 2022 08:11:02 GMT, Aleksey Shipilev wrote: > > > Fix looks good as far as it goes (can't believe I didn't see what was > > > going on here!) - but `os::signal` is still broken as it uses > > > `sa_handler` instead of `sa_sigaction`. > > > > > > Yikes! I think this change should

Re: RFR: 8294594: Fix cast-function-type warnings in signal handling code [v2]

2022-10-11 Thread Aleksey Shipilev
On Tue, 11 Oct 2022 07:44:30 GMT, Kim Barrett wrote: > > Fix looks good as far as it goes (can't believe I didn't see what was going > > on here!) - but `os::signal` is still broken as it uses `sa_handler` > > instead of `sa_sigaction`. > > Yikes! I think this change should proceed as is, and

Re: RFR: 8294594: Fix cast-function-type warnings in signal handling code [v2]

2022-10-11 Thread Kim Barrett
On Tue, 11 Oct 2022 01:47:45 GMT, David Holmes wrote: > Fix looks good as far as it goes (can't believe I didn't see what was going > on here!) - but `os::signal` is still broken as it uses `sa_handler` instead > of `sa_sigaction`. Yikes! I think this change should proceed as is, and `os::sig

RFR: 8294997: Improve ECC math operations

2022-10-11 Thread Daniel Jeliński
This patch rewrites some BigInteger and curve point operations used in EC calculations: - coefficient * 2^power is equivalent to coefficient << power - number mod 2^n is equivalent to number & (2^n-1) - pair of IntegerModuloP operations: t2 = t1+t1 t1 = t1+t2 is equivalent to t1=t1*3, which is now