<div dir="ltr">Okay, I think I missed this, so committed.<div><br></div><div>Thanks</div><div>Nelson</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Apr 1, 2025 at 11:43 PM Marek Pikuła <<a href="mailto:m.pikula@partner.samsung.com">m.pikula@partner.samsung.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The flag already exists but it's not been exposed to user.<br>
<br>
Signed-off-by: Marek Pikuła <<a href="mailto:m.pikula@partner.samsung.com" target="_blank">m.pikula@partner.samsung.com</a>><br>
---<br>
binutils/doc/binutils.texi | 8 ++++++++<br>
opcodes/riscv-dis.c | 6 +++++-<br>
2 files changed, 13 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi<br>
index 5bf5d80b85b..b7803398222 100644<br>
--- a/binutils/doc/binutils.texi<br>
+++ b/binutils/doc/binutils.texi<br>
@@ -2704,6 +2704,14 @@ but the result again may not be as you expect.<br>
For RISC-V, the following options are supported:<br>
<br>
@table @code<br>
+@item max<br>
+Disassemble without checking architecture string. This is a best effort mode, so<br>
+for overlapping ISA extensions the first match (possibly incorrect in a given<br>
+context) will be used to decode the instruction. It's useful, if the ELF file<br>
+doesn't expose ISA string, preventing automatic ISA subset deduction, and the<br>
+default fallback ISA string (@code{rv64gc}) doesn't cover all instructions in<br>
+the binary.<br>
+<br>
@item numeric<br>
Print numeric register names, rather than ABI names (e.g., print @code{x2}<br>
instead of @code{sp}).<br>
diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c<br>
index f862ef28a16..277b8fd4737 100644<br>
--- a/opcodes/riscv-dis.c<br>
+++ b/opcodes/riscv-dis.c<br>
@@ -69,7 +69,7 @@ struct riscv_private_data<br>
const char (*riscv_fpr_names)[NRC];<br>
/* If set, disassemble as most general instruction. */<br>
bool no_aliases;<br>
- /* If set, disassemble without checking architectire string, just like what<br>
+ /* If set, disassemble without checking architecture string, just like what<br>
we did at the beginning. */<br>
bool all_ext;<br>
};<br>
@@ -83,6 +83,7 @@ set_default_riscv_dis_options (struct disassemble_info *info)<br>
pd->riscv_gpr_names = riscv_gpr_names_abi;<br>
pd->riscv_fpr_names = riscv_fpr_names_abi;<br>
pd->no_aliases = false;<br>
+ pd->all_ext = false;<br>
}<br>
<br>
/* Parse RISC-V disassembler option (without arguments). */<br>
@@ -1580,6 +1581,9 @@ static struct<br>
riscv_option_arg_t arg;<br>
} riscv_options[] =<br>
{<br>
+ { "max",<br>
+ N_("Disassemble without checking architecture string."),<br>
+ RISCV_OPTION_ARG_NONE },<br>
{ "numeric",<br>
N_("Print numeric register names, rather than ABI names."),<br>
RISCV_OPTION_ARG_NONE },<br>
--<br>
2.49.0<br>
</blockquote></div>