RFR: 8253757: Add LLVM-based backend for hsdis
Yasumasa Suenaga
ysuenaga at openjdk.java.net
Wed Oct 7 00:51:06 UTC 2020
On Fri, 2 Oct 2020 11:44:51 GMT, Magnus Ihse Bursie <ihse at openjdk.org> 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
> https://bugs.openjdk.java.net/browse/JDK-8188073, which unfortunately has not seen much progress due to lack of
> resources; I don't know if you are aware of that? There is also a (extremely low priority) effort to rewrite the hsdis
> makefile to be part of the normal build system, see e.g. https://bugs.openjdk.java.net/browse/JDK-8208495. Neither of
> these should be any blocker for your change, but I think it might be good if you know about them. I have couple of
> concerns with your patch. One is the method in which LLVM is selected instead of binutils; afaict this depends on
> having the `LLVM` variable set when executing the makefile. At the very least, this should be documented in the README.
> I don't think any more complicated configuration is really necessary at this point. With full integration with the
> build system, a more user-friendly way of selecting hsdis backend should be implemented, though. Second, and I don't
> know if this is an artifact of git/github/the new skara tooling, but if you renamed hsdis.c to hsdis.cpp, this
> relationship does not show up, not even in the generated webrevs. Instead they are considered a new + a deleted file.
> This makes it hard to see what code changes you have done in that file. And third; have you tested that your changes
> (both changing the main file from C to C++, and any code changes in it) does not break the old binutils functionality?
> Afaic there are no test suites for exercising hsdis :-( so manual ad-hoc testing is likely needed.
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 recently binutils? If we can use binutils on Windows
AArch64, you can fix makefile only.
https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=binutils/dlltool.c;h=ed016b97dc38cdb1b85d2f6df676b9c9750f0d41;hb=HEAD#l248
-------------
PR: https://git.openjdk.java.net/jdk/pull/392
More information about the build-dev
mailing list