aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-12-12 10:56:23 +1030
committerAlan Modra <amodra@gmail.com>2017-12-12 11:03:58 +1030
commit4b1c0f7e85f2aec3df3498d04b5beaf45813dea8 (patch)
tree9e66fb49496e4356484b4ca568c1bc6e9bd57bc7
parentdce4fb839ca81ba4aefa9f5dfde8c8041826b3bb (diff)
downloadgdb-4b1c0f7e85f2aec3df3498d04b5beaf45813dea8.zip
gdb-4b1c0f7e85f2aec3df3498d04b5beaf45813dea8.tar.gz
gdb-4b1c0f7e85f2aec3df3498d04b5beaf45813dea8.tar.bz2
Don't mask X_add_number containing a register number
It's obviously wrong to mask SPRs to 8 bits. PR 21118 * config/tc-ppc.c (md_assemble): Don't mask register number.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-ppc.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 5cae4d1..99cd425 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2017-12-12 Alan Modra <amodra@gmail.com>
+
+ PR 21118
+ * config/tc-ppc.c (md_assemble): Don't mask register number.
+
2017-12-07 Max Filippov <jcmvbkbc@gmail.com>
* config/tc-xtensa.c (xg_order_trampoline_chain): Replace
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index d4f3d60..d28164e 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -3040,7 +3040,7 @@ md_assemble (char *str)
&& ex.X_add_number != 0
&& (operand->flags & PPC_OPERAND_GPR_0) != 0))
as_warn (_("invalid register expression"));
- insn = ppc_insert_operand (insn, operand, ex.X_add_number & 0xff,
+ insn = ppc_insert_operand (insn, operand, ex.X_add_number,
ppc_cpu, (char *) NULL, 0);
}
else if (ex.X_op == O_constant)