Re: RFR: 8253757: Add LLVM-based backend for hsdis

2022-02-18 Thread Ludovic Henry
On Fri, 18 Feb 2022 11:44:04 GMT, Magnus Ihse Bursie wrote: > Third time's a charm! After the two previous closed PRs for this issue, I > think this functionality is finally ready to enter mainline. :) > > This code is at it's core the same as the previous PR. The main C++ hsdis >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2022-02-18 Thread Erik Joelsson
On Fri, 18 Feb 2022 11:44:04 GMT, Magnus Ihse Bursie wrote: > Third time's a charm! After the two previous closed PRs for this issue, I > think this functionality is finally ready to enter mainline. :) > > This code is at it's core the same as the previous PR. The main C++ hsdis >

RFR: 8253757: Add LLVM-based backend for hsdis

2022-02-18 Thread Magnus Ihse Bursie
Third time's a charm! After the two previous closed PRs for this issue, I think this functionality is finally ready to enter mainline. :) This code is at it's core the same as the previous PR. The main C++ hsdis implementation is still the one @luhenry wrote, with some changes. As in the

Re: RFR: 8253757: Add LLVM-based backend for hsdis [v8]

2022-02-16 Thread Magnus Ihse Bursie
On Wed, 16 Feb 2022 14:39:49 GMT, Magnus Ihse Bursie wrote: >> This patch expands the newly added system for hsdis backends to include LLVM. >> >> The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, >> as published in the never integrated PR >>

Re: RFR: 8253757: Add LLVM-based backend for hsdis [v8]

2022-02-16 Thread Magnus Ihse Bursie
> This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR > https://github.com/openjdk/jdk/pull/392. (I have basically just ripped out > the

Re: RFR: 8253757: Add LLVM-based backend for hsdis [v7]

2022-02-16 Thread Magnus Ihse Bursie
> This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR > https://github.com/openjdk/jdk/pull/392. (I have basically just ripped out > the

Re: RFR: 8253757: Add LLVM-based backend for hsdis [v6]

2022-02-15 Thread Magnus Ihse Bursie
> This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR > https://github.com/openjdk/jdk/pull/392. (I have basically just ripped out > the

Re: RFR: 8253757: Add LLVM-based backend for hsdis [v5]

2022-02-15 Thread Magnus Ihse Bursie
> This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR > https://github.com/openjdk/jdk/pull/392. (I have basically just ripped out > the

Re: RFR: 8253757: Add LLVM-based backend for hsdis [v4]

2022-02-15 Thread Magnus Ihse Bursie
> This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR > https://github.com/openjdk/jdk/pull/392. (I have basically just ripped out > the

Re: RFR: 8253757: Add LLVM-based backend for hsdis [v3]

2022-02-15 Thread Magnus Ihse Bursie
> This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR > https://github.com/openjdk/jdk/pull/392. (I have basically just ripped out > the

Re: RFR: 8253757: Add LLVM-based backend for hsdis [v2]

2022-02-15 Thread Magnus Ihse Bursie
> This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR > https://github.com/openjdk/jdk/pull/392. (I have basically just ripped out > the

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2022-02-10 Thread Magnus Ihse Bursie
On Wed, 13 Oct 2021 00:00:22 GMT, Magnus Ihse Bursie wrote: > This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2022-01-12 Thread Saint Wesonga
On Wed, 17 Nov 2021 13:17:21 GMT, Magnus Ihse Bursie wrote: >> This patch expands the newly added system for hsdis backends to include LLVM. >> >> The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, >> as published in the never integrated PR >>

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2022-01-11 Thread Saint Wesonga
On Wed, 17 Nov 2021 13:17:21 GMT, Magnus Ihse Bursie wrote: >> This patch expands the newly added system for hsdis backends to include LLVM. >> >> The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, >> as published in the never integrated PR >>

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-11-17 Thread Magnus Ihse Bursie
On Wed, 13 Oct 2021 00:00:22 GMT, Magnus Ihse Bursie wrote: > This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-20 Thread Magnus Ihse Bursie
On Tue, 19 Oct 2021 04:47:52 GMT, Nick Gasson wrote: >> This patch expands the newly added system for hsdis backends to include LLVM. >> >> The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, >> as published in the never integrated PR >>

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-18 Thread Nick Gasson
On Wed, 13 Oct 2021 00:00:22 GMT, Magnus Ihse Bursie wrote: > This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-18 Thread Nick Gasson
On Wed, 13 Oct 2021 00:00:22 GMT, Magnus Ihse Bursie wrote: > This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-18 Thread Andrew Haley
On Mon, 18 Oct 2021 09:10:32 GMT, Andrew Haley wrote: > >Can you describe a reproducer? > Sure. Create a .hotspot_compiler file containing print > java.lang.String::checkIndex then Sorry, thinko. You don't need the .hotspot_compiler file - PR:

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-18 Thread Andrew Haley
On Wed, 13 Oct 2021 00:00:22 GMT, Magnus Ihse Bursie wrote: > This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-16 Thread Magnus Ihse Bursie
On Fri, 15 Oct 2021 15:36:14 GMT, Andrew Haley wrote: >> The value add of this LLVM-based hsdis is two-fold: >> - It supports platforms that aren't supported by binutils (Windows-AArch64 >> for example) >> - The license being more permissive would allow to build it as part of the >> OpenJDK

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-15 Thread Andrew Haley
On Fri, 15 Oct 2021 08:20:05 GMT, Ludovic Henry wrote: > Since the maintenance is fairly low (small codebase, small and knowledgable > user base), I would be biased towards including it with appropriate warnings. I don't think we should commit code that we know is broken. I don't believe that

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-15 Thread monica beckwith
Hi all, I am on vacation right now, but we can take a look next week and see how we can support the LLVM backend for hsdis. It is much required by Windows-AArch64 and we would hate for all the good work to not make it upstream. Monica Sent from my Arm powered smart device. On Thu, Oct 14,

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-15 Thread Ludovic Henry
On Wed, 13 Oct 2021 00:00:22 GMT, Magnus Ihse Bursie wrote: > This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-14 Thread Jorn Vernee
On Thu, 14 Oct 2021 14:04:12 GMT, Andrew Haley wrote: > Some feedback from those who have tested it would be appeciated here I haven't really tested it beyond building the lib and seeing if assembly was output instead of just bytes, so I can't really comment on that I'm afraid. Since the

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-14 Thread Andrew Haley
On Wed, 13 Oct 2021 07:26:21 GMT, Ludovic Henry wrote: >> This patch expands the newly added system for hsdis backends to include LLVM. >> >> The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, >> as published in the never integrated PR >>

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-14 Thread Magnus Ihse Bursie
On Thu, 14 Oct 2021 09:46:47 GMT, Andrew Haley wrote: >> This patch expands the newly added system for hsdis backends to include LLVM. >> >> The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, >> as published in the never integrated PR >>

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-14 Thread Andrew Haley
On Wed, 13 Oct 2021 00:00:22 GMT, Magnus Ihse Bursie wrote: > This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-13 Thread Andrew Haley
On Wed, 13 Oct 2021 13:55:04 GMT, Andrew Haley wrote: >> This patch expands the newly added system for hsdis backends to include LLVM. >> >> The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, >> as published in the never integrated PR >>

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-13 Thread Ludovic Henry
On Wed, 13 Oct 2021 00:00:22 GMT, Magnus Ihse Bursie wrote: > This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-13 Thread Magnus Ihse Bursie
On Wed, 13 Oct 2021 13:04:45 GMT, Jorn Vernee wrote: > The only other issue I had is that `install-hsdis` only copies the library to > the exploded JDK, so I manually copy it to `images/jdk/bin/server` afterwards. @JornVernee Ah, good point! I need to make sure it gets copied to the image as

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-13 Thread Magnus Ihse Bursie
On Wed, 13 Oct 2021 13:55:04 GMT, Andrew Haley wrote: >> This patch expands the newly added system for hsdis backends to include LLVM. >> >> The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, >> as published in the never integrated PR >>

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-13 Thread Andrew Haley
On Wed, 13 Oct 2021 00:00:22 GMT, Magnus Ihse Bursie wrote: > This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-13 Thread Jorn Vernee
On Wed, 13 Oct 2021 00:00:22 GMT, Magnus Ihse Bursie wrote: > This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-13 Thread Erik Joelsson
On Wed, 13 Oct 2021 00:00:22 GMT, Magnus Ihse Bursie wrote: > This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-13 Thread Magnus Ihse Bursie
On Wed, 13 Oct 2021 00:32:03 GMT, Jorn Vernee wrote: >> This patch expands the newly added system for hsdis backends to include LLVM. >> >> The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, >> as published in the never integrated PR >>

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-13 Thread Ludovic Henry
On Wed, 13 Oct 2021 00:00:22 GMT, Magnus Ihse Bursie wrote: > This patch expands the newly added system for hsdis backends to include LLVM. > > The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, > as published in the never integrated PR >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-12 Thread Jorn Vernee
On Wed, 13 Oct 2021 00:00:22 GMT, Magnus Ihse Bursie wrote: > but it caused hotspot to segfault in LoadLibrary (!) in os::dll_load when I > tried to load the library. I tried compiling the binutils-based hsdis earlier as well, but on WSL instead of cygwin (using the `mingw-w64` package), and

RFR: 8253757: Add LLVM-based backend for hsdis

2021-10-12 Thread Magnus Ihse Bursie
This patch expands the newly added system for hsdis backends to include LLVM. The actual code in hsdis-llvm.cpp is based heavily on the work by @luhenry, as published in the never integrated PR https://github.com/openjdk/jdk/pull/392. (I have basically just ripped out the binutils-based part of

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2020-12-21 Thread Ludovic Henry
On Mon, 21 Dec 2020 16:03:31 GMT, Magnus Ihse Bursie wrote: >> FWIW, I started working on a framework which would add support for >> selectable backends for hsdis. Unfortunately it was not as simple as I >> initially thought, so I had to put it on hold while directing my time to >> working on

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2020-12-21 Thread Magnus Ihse Bursie
On Mon, 23 Nov 2020 15:55:43 GMT, Magnus Ihse Bursie wrote: >> I think a proper solution to both this and the Capstone implementation is to >> provide a proper framework for selecting the hsdis backend as a first step, >> and refactor the existing bfd implementation as the first such backend.

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2020-11-23 Thread Magnus Ihse Bursie
On Mon, 26 Oct 2020 11:41:16 GMT, Magnus Ihse Bursie wrote: >> Some notes (perhaps most to myself) about how this ties into the existing >> hsdis implementation, and with JDK-8188073 (Capstone porting). >> >> When printing disassembly from hotspot, the current solution tries to locate >> and

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2020-10-26 Thread Magnus Ihse Bursie
On Mon, 26 Oct 2020 11:37:52 GMT, Magnus Ihse Bursie wrote: >> Since I found it close to impossible to review the changes when I could not >> get a diff with the changes done to hsdis.c/cpp, I created a webrev which >> shows these changes. I made this by renaming hsdis.cpp back to hsdis.c,

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2020-10-26 Thread Magnus Ihse Bursie
On Mon, 26 Oct 2020 11:16:28 GMT, Magnus Ihse Bursie wrote: >>> @navyxliu >>> >>> > @luhenry I tried to build it with LLVM10.0.1 >>> > on my x86_64, ubuntu, I ran into a small problem. here is how I build. >>> > $make ARCH=amd64 CC=/opt/llvm/bin/clang CXX=/opt/llvm/bin/clang++ >>> >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2020-10-26 Thread Magnus Ihse Bursie
On Thu, 8 Oct 2020 20:40:50 GMT, Xin Liu wrote: >> @navyxliu >> >>> @luhenry I tried to build it with LLVM10.0.1 >>> on my x86_64, ubuntu, I ran into a small problem. here is how I build. >>> $make ARCH=amd64 CC=/opt/llvm/bin/clang CXX=/opt/llvm/bin/clang++ >>> LLVM=/opt/llvm/ >>> >>> I can't

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2020-10-08 Thread Xin Liu
On Thu, 8 Oct 2020 18:15:10 GMT, Ludovic Henry wrote: > @navyxliu > > > @luhenry I tried to build it with LLVM10.0.1 > > on my x86_64, ubuntu, I ran into a small problem. here is how I build. > > $make ARCH=amd64 CC=/opt/llvm/bin/clang CXX=/opt/llvm/bin/clang++ > > LLVM=/opt/llvm/ > > I can't

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2020-10-08 Thread Ludovic Henry
On Thu, 8 Oct 2020 18:07:59 GMT, Ludovic Henry wrote: >>> 1 question: binutils seems to support Windows AArch64. Did you try recently >>> binutils? If we can use binutils on Windows >>> AArch64, you can fix makefile only. >>>

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2020-10-08 Thread Ludovic Henry
On Thu, 8 Oct 2020 12:30:13 GMT, Bernhard Urban-Forster wrote: >> IMHO, it's great to have an alternative disassembler. I personally had >> better experience using llvm MC when I decoded >> aarch64 and AVX instructions than BFD. Another argument is that LLVM >> toolchain is supposed to

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2020-10-08 Thread Bernhard Urban-Forster
On Wed, 7 Oct 2020 08:02:59 GMT, Xin Liu wrote: >> Can you separate LLVM and binutils from hsdis.cpp? >> >> I guess you say that the problem is both GCC and binutils are not available >> on Windows AArch64. Is it right? >> 1 question: binutils seems to support Windows AArch64. Did you try

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2020-10-07 Thread Xin Liu
On Wed, 7 Oct 2020 00:48:24 GMT, Yasumasa Suenaga wrote: >> This is an interesting suggestion. There is a similar attempt at replacing >> binutils with capstone in >> https://bugs.openjdk.java.net/browse/JDK-8188073, which unfortunately has >> not seen much progress due to lack of >>

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2020-10-06 Thread Yasumasa Suenaga
On Fri, 2 Oct 2020 11:44:51 GMT, Magnus Ihse Bursie wrote: >> @navyxliu I've merged the sources into `src/utils/hsdis` and added support >> to build it in the Makefile. > > This is an interesting suggestion. There is a similar attempt at replacing > binutils with capstone in >

Re: RFR: 8253757: Add LLVM-based backend for hsdis

2020-10-02 Thread Magnus Ihse Bursie
On Wed, 30 Sep 2020 00:55:23 GMT, Ludovic Henry wrote: >> When bringing up Hotspot onto new platforms, it is not always possible to >> compile hsdis because gcc is not yet >> available. For example, for Windows-AArch64 and macOS-AArch64. >> For some such platforms, it is possible to use LLVM as