From: "Xiaolin Zheng" <yunyao.zxl@alibaba-inc.com>
To: "binutils" <binutils@sourceware.org>
Subject: RISC-V: Should the return value of print_insn_riscv() keep align with other platforms when read_memory_func() returns a non-zero value?
Date: Mon, 20 Feb 2023 18:10:11 +0800 [thread overview]
Message-ID: <cb9c370a-fc67-486f-aafb-b5b7d611f868.yunyao.zxl@alibaba-inc.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1698 bytes --]
Hi, Binutils developers on the RISC-V backend:
Hope this is the right place to send one email to the Binutils mailing list. We have met a small issue [1] in OpenJDK when using the `disassembler()` API in `dis-asm.h` to disassemble. In the RISC-V backend of Binutils, if `read_memory_func` returns a `status`, a non-zero value, after calling `memory_error_func` we will use the `status` variable as the final return value [2], which is different from other platforms that use a `-1` as return value [3] [4] [5] [6]. Although we could have some workaround for this on our side, the question is, should the behavior keep the same as on other platforms?
Best Regards,
Xiaolin
[1] https://github.com/openjdk/jdk/pull/12551 <https://github.com/openjdk/jdk/pull/12551 >
[2] https://github.com/bminor/binutils-gdb/blob/binutils-2_38-branch/opcodes/riscv-dis.c#L940 <https://github.com/bminor/binutils-gdb/blob/binutils-2_38-branch/opcodes/riscv-dis.c#L940 >
[3] https://github.com/bminor/binutils-gdb/blob/binutils-2_38-branch/opcodes/aarch64-dis.c#L3792 <https://github.com/bminor/binutils-gdb/blob/binutils-2_38-branch/opcodes/aarch64-dis.c#L3792 >
[4] https://github.com/bminor/binutils-gdb/blob/binutils-2_38-branch/opcodes/ppc-dis.c#L872 <https://github.com/bminor/binutils-gdb/blob/binutils-2_38-branch/opcodes/ppc-dis.c#L872 >
[5] https://github.com/bminor/binutils-gdb/blob/binutils-2_38-branch/opcodes/s390-dis.c#L305 <https://github.com/bminor/binutils-gdb/blob/binutils-2_38-branch/opcodes/s390-dis.c#L305 >
[6] https://github.com/bminor/binutils-gdb/blob/binutils-2_38-branch/opcodes/i386-dis.c#L9466 <https://github.com/bminor/binutils-gdb/blob/binutils-2_38-branch/opcodes/i386-dis.c#L9466 >
next reply other threads:[~2023-02-20 10:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 10:10 Xiaolin Zheng [this message]
2023-02-21 1:28 ` Nelson Chu
2023-02-21 3:30 ` Xiaolin Zheng
2023-03-01 9:09 ` Xiaolin Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cb9c370a-fc67-486f-aafb-b5b7d611f868.yunyao.zxl@alibaba-inc.com \
--to=yunyao.zxl@alibaba-inc.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).