This commit improves internal error message
"internal: bad RISC-V opcode (bits 0x%lx undefined): %s %s"
to display actual unused bits (excluding non-instruction bits).
gas/ChangeLog:
* config/tc-riscv.c (validate_riscv_insn): Exclude non-
instruction bits from displaying internal diagnostics.
Change error message slightly.
if (used_bits != required_bits)
{
as_bad (_("internal: bad RISC-V opcode "
- "(bits 0x%lx undefined): %s %s"),
- ~(unsigned long)(used_bits & required_bits),
+ "(bits %#llx undefined or invalid): %s %s"),
+ (unsigned long long)(used_bits ^ required_bits),
opc->name, opc->args);
return false;
}