RISC-V: Fix inconsistent error message (range)
authorTsukasa OI <research_trasio@irq.a4lg.com>
Fri, 10 Jun 2022 10:00:19 +0000 (19:00 +0900)
committerNelson Chu <nelson.chu@sifive.com>
Wed, 22 Jun 2022 10:13:16 +0000 (18:13 +0800)
This commit fixes inconsistent error message format involving compressed
funct<n> fields.  In specific, funct6 had an error message with range
0..2^<n> ("0..64") unlike other funct<n> fields with 0..2^<n>-1
(e.g. funct4 with "0..15").

gas/ChangeLog:

* config/tc-riscv.c (riscv_ip): Fix inconsistent error message.

gas/config/tc-riscv.c

index 1b730b4be36afc08729cdcf8ec9cb12719e42f40..a10ae8e237b9ebdd6d356f30975f8bd99f4f3e6e 100644 (file)
@@ -2582,7 +2582,7 @@ riscv_ip (char *str, struct riscv_cl_insn *ip, expressionS *imm_expr,
                            || imm_expr->X_add_number >= 64)
                          {
                            as_bad (_("bad value for compressed funct6 "
-                                     "field, value must be 0...64"));
+                                     "field, value must be 0...63"));
                            break;
                          }
                        INSERT_OPERAND (CFUNCT6, *ip, imm_expr->X_add_number);