diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index 41d6dfc6062..dacfe0f1d25 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -1313,8 +1313,8 @@ validate_riscv_insn (const struct riscv_opcode *opc, int length) 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; }