aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2017-05-10 23:59:50 -0700
committerPalmer Dabbelt <palmer@dabbelt.com>2017-06-23 09:21:49 -0700
commit94f78a777c396fa1ce2f40d34afed1b6b5012196 (patch)
treeb1e7edecf69128cc26e908dea770eb7ae4b44a86 /gas
parent4aa57d6a2bfc4e48fa6a685bfa164db5ae2e1c1c (diff)
downloadgdb-94f78a777c396fa1ce2f40d34afed1b6b5012196.zip
gdb-94f78a777c396fa1ce2f40d34afed1b6b5012196.tar.gz
gdb-94f78a777c396fa1ce2f40d34afed1b6b5012196.tar.bz2
RISC-V: Error, don't warn, for shfit amounts/CSRs
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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-riscv.c16
2 files changed, 13 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 93914da..e5130e7 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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.
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index 0a9817a..afda6c5 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -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;