mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
RISC-V: Improve "bits undefined" diagnostics
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.
This commit is contained in:
@ -1398,8 +1398,8 @@ validate_riscv_insn (const struct riscv_opcode *opc, int length)
|
|||||||
if (used_bits != required_bits)
|
if (used_bits != required_bits)
|
||||||
{
|
{
|
||||||
as_bad (_("internal: bad RISC-V opcode "
|
as_bad (_("internal: bad RISC-V opcode "
|
||||||
"(bits 0x%lx undefined): %s %s"),
|
"(bits %#llx undefined or invalid): %s %s"),
|
||||||
~(unsigned long)(used_bits & required_bits),
|
(unsigned long long)(used_bits ^ required_bits),
|
||||||
opc->name, opc->args);
|
opc->name, opc->args);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user