RFR: 8253757: Add LLVM-based backend for hsdis
Bernhard Urban-Forster
burban at openjdk.java.net
Thu Oct 8 12:33:46 UTC 2020
On Wed, 7 Oct 2020 08:02:59 GMT, Xin Liu <xliu at openjdk.org> 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 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
>
> 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 provide the premium
> experience on non-gnu platforms such as FreeBSD. @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 meet this condition because Makefile defines LIBOS_linux.
> #elif defined(LIBOS_Linux) && defined(LIBARCH_amd64)
> return "x86_64-pc-linux-gnu";
>
> Actually, Makefile assigns OS to windows/linux/aix/macosx (all lower case)and then
> `CPPFLAGS += -DLIBOS_$(OS) -DLIBOS="$(OS)" -DLIBARCH_$(LIBARCH) -DLIBARCH="$(LIBARCH)" -DLIB_EXT="$(LIB_EXT)"`
>
> In hsdis.cpp, `native_target_triple` needs to match whatever Makefile defined. With that fix, I generate llvm version
> hsdis-amd64.so and it works flawlessly
> 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
This is armv7, I don't see any support for armv8/AArch64 in `dlltool.c`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/392
More information about the build-dev
mailing list