Don't mask X_add_number containing a register number
authorAlan Modra <amodra@gmail.com>
Tue, 12 Dec 2017 00:26:23 +0000 (10:56 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 12 Dec 2017 00:33:58 +0000 (11:03 +1030)
It's obviously wrong to mask SPRs to 8 bits.

PR 21118
* config/tc-ppc.c (md_assemble): Don't mask register number.

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

index 5cae4d1c0f1dc27d80121e01e2628fa1b78e5096..99cd42582ebcb7a72d7245f2920f26cdd8e88392 100644 (file)
@@ -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
index d4f3d605ba5dd08415e13e3fa4652dbe7a15852b..d28164ee15fb830203b84db12f35e6e61a969bca 100644 (file)
@@ -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)