aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-02-20 12:06:52 +1030
committerAlan Modra <amodra@gmail.com>2017-02-20 13:32:02 +1030
commitece5dcc1c00a48ecf63eae71983d04270cef4280 (patch)
treeb9d7c32b5f2c6265303529e9cb48aa9ea38d782d
parent99de87c36ad0b224618c7ff2b9d13180af6c8776 (diff)
downloadgdb-ece5dcc1c00a48ecf63eae71983d04270cef4280.zip
gdb-ece5dcc1c00a48ecf63eae71983d04270cef4280.tar.gz
gdb-ece5dcc1c00a48ecf63eae71983d04270cef4280.tar.bz2
Downgrade powerpc register error to warning
PR 21118 * NEWS: Revise powerpc register check. * config/tc-ppc.c (ppc_optimize_expr, md_assemble): Make "invalid register expression" a warning.
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/NEWS4
-rw-r--r--gas/config/tc-ppc.c6
3 files changed, 12 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index a15f92e..9f7ce60 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2017-02-20 Alan Modra <amodra@gmail.com>
+
+ PR 21118
+ * NEWS: Revise powerpc register check.
+ * config/tc-ppc.c (ppc_optimize_expr, md_assemble): Make "invalid
+ register expression" a warning.
+
2017-02-17 Maciej W. Rozycki <macro@imgtec.com>
* ecoff.c (ecoff_directive_ent, add_procedure): Handle `.aent'.
diff --git a/gas/NEWS b/gas/NEWS
index ef0780d..aee3852 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -1,8 +1,8 @@
-*- text -*-
* PowerPC gas now checks that the correct register class is used in
- instructions. For instance, "addi %f4,%cr3,%r31" is now rejected
- rather than silently producing "addi r4,r3,31".
+ instructions. For instance, "addi %f4,%cr3,%r31" warns three times
+ that the registers are invalid.
* Add support for the Texas Instruments PRU processor.
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index fd5cc35..d52850c 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -974,7 +974,7 @@ ppc_optimize_expr (expressionS *left, operatorT op, expressionS *right)
/* Accept reg +/- constant. */
if (left->X_op == O_register
&& !((op == O_add || op == O_subtract) && right->X_op == O_constant))
- as_bad (_("invalid register expression"));
+ as_warn (_("invalid register expression"));
/* Accept constant + reg. */
if (right->X_op == O_register)
@@ -982,7 +982,7 @@ ppc_optimize_expr (expressionS *left, operatorT op, expressionS *right)
if (op == O_add && left->X_op == O_constant)
left->X_md = right->X_md;
else
- as_bad (_("invalid register expression"));
+ as_warn (_("invalid register expression"));
}
return 0;
@@ -2976,7 +2976,7 @@ md_assemble (char *str)
&& !((ex.X_md & PPC_OPERAND_GPR) != 0
&& ex.X_add_number != 0
&& (operand->flags & PPC_OPERAND_GPR_0) != 0))
- as_bad (_("invalid register expression"));
+ as_warn (_("invalid register expression"));
insn = ppc_insert_operand (insn, operand, ex.X_add_number & 0xff,
ppc_cpu, (char *) NULL, 0);
}