RISC-V: Error, don't warn, for shfit amounts/CSRs
authorAndrew Waterman <andrew@sifive.com>
Thu, 11 May 2017 06:59:50 +0000 (23:59 -0700)
committerPalmer Dabbelt <palmer@dabbelt.com>
Fri, 23 Jun 2017 16:21:49 +0000 (09:21 -0700)
gas/ChangeLog

2017-05-11  Andrew Waterman  <andrew@sifive.com>

       * config/tc-riscv.c (riscv_ip): Changes as_warn to as_bad for improper
       shift amounts.

gas/ChangeLog
gas/config/tc-riscv.c

index 93914da731ac6c9071bd40fa870cb2e5c4f4482a..e5130e73cc53042962cc65214b34fbd90b6c1446 100644 (file)
@@ -1,3 +1,8 @@
+2017-05-11  Andrew Waterman  <andrew@sifive.com>
+
+       * config/tc-riscv.c (riscv_ip): Changes as_warn to as_bad for improper
+       shift amounts.
+
 2017-06-22  Nick Clifton  <nickc@redhat.com>
 
        * config/tc-arm.c (arm_ext_v7m): Add ATTRIBUTE_UNUSED.
index 0a9817a3201d95a88b9975bbcad02dba8423378b..afda6c51248b9d1dc53d319e47875a1c13c38e65 100644 (file)
@@ -1445,8 +1445,8 @@ rvc_lui:
              my_getExpression (imm_expr, s);
              check_absolute_expr (ip, imm_expr);
              if ((unsigned long) imm_expr->X_add_number > 31)
-               as_warn (_("Improper shift amount (%lu)"),
-                        (unsigned long) imm_expr->X_add_number);
+               as_bad (_("Improper shift amount (%lu)"),
+                       (unsigned long) imm_expr->X_add_number);
              INSERT_OPERAND (SHAMTW, *ip, imm_expr->X_add_number);
              imm_expr->X_op = O_absent;
              s = expr_end;
@@ -1456,8 +1456,8 @@ rvc_lui:
              my_getExpression (imm_expr, s);
              check_absolute_expr (ip, imm_expr);
              if ((unsigned long) imm_expr->X_add_number >= xlen)
-               as_warn (_("Improper shift amount (%lu)"),
-                        (unsigned long) imm_expr->X_add_number);
+               as_bad (_("Improper shift amount (%lu)"),
+                       (unsigned long) imm_expr->X_add_number);
              INSERT_OPERAND (SHAMT, *ip, imm_expr->X_add_number);
              imm_expr->X_op = O_absent;
              s = expr_end;
@@ -1467,8 +1467,8 @@ rvc_lui:
              my_getExpression (imm_expr, s);
              check_absolute_expr (ip, imm_expr);
              if ((unsigned long) imm_expr->X_add_number > 31)
-               as_warn (_("Improper CSRxI immediate (%lu)"),
-                        (unsigned long) imm_expr->X_add_number);
+               as_bad (_("Improper CSRxI immediate (%lu)"),
+                       (unsigned long) imm_expr->X_add_number);
              INSERT_OPERAND (RS1, *ip, imm_expr->X_add_number);
              imm_expr->X_op = O_absent;
              s = expr_end;
@@ -1482,8 +1482,8 @@ rvc_lui:
                  my_getExpression (imm_expr, s);
                  check_absolute_expr (ip, imm_expr);
                  if ((unsigned long) imm_expr->X_add_number > 0xfff)
-                   as_warn (_("Improper CSR address (%lu)"),
-                            (unsigned long) imm_expr->X_add_number);
+                   as_bad (_("Improper CSR address (%lu)"),
+                           (unsigned long) imm_expr->X_add_number);
                  INSERT_OPERAND (CSR, *ip, imm_expr->X_add_number);
                  imm_expr->X_op = O_absent;
                  s = expr_end;