This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed][AArch64] Fix bogus MOVPRFX warning for GPR form of CPY
- From: Richard Sandiford <richard dot sandiford at arm dot com>
- To: binutils at sourceware dot org
- Date: Tue, 02 Jul 2019 11:07:12 +0100
- Subject: [committed][AArch64] Fix bogus MOVPRFX warning for GPR form of CPY
One of the MOVPRFX tests has:
output register of preceding `movprfx' used as input at operand 3 -- `cpy z1.d,p1/m,x1'
But X1 and Z1 are not the same register, so the instruction is
actually OK.
Tested on aarch64-linux-gnu. Applied to master and binutils-2_32-branch.
Richard
2019-07-02 Richard Sandiford <richard.sandiford@arm.com>
opcodes/
* aarch64-opc.c (verify_constraints): Skip GPRs when scanning the
registers in an instruction prefixed by MOVPRFX.
gas/
* testsuite/gas/aarch64/sve-movprfx_25.s: Allow CPY Z1.D.P1/M,X1
to be prefixed by MOVPRFX.
* testsuite/gas/aarch64/sve-movprfx_25.d: Update accordingly.
* testsuite/gas/aarch64/sve-movprfx_25.l: Likewise.
Index: opcodes/aarch64-opc.c
===================================================================
--- opcodes/aarch64-opc.c 2019-05-15 18:28:02.808241095 +0100
+++ opcodes/aarch64-opc.c 2019-07-02 10:47:17.488158955 +0100
@@ -4968,11 +4968,6 @@ verify_constraints (const struct aarch64
case AARCH64_OPND_Vm:
case AARCH64_OPND_Sn:
case AARCH64_OPND_Sm:
- case AARCH64_OPND_Rn:
- case AARCH64_OPND_Rm:
- case AARCH64_OPND_Rn_SP:
- case AARCH64_OPND_Rt_SP:
- case AARCH64_OPND_Rm_SP:
if (inst_op.reg.regno == blk_dest.reg.regno)
{
num_op_used++;
Index: gas/testsuite/gas/aarch64/sve-movprfx_25.s
===================================================================
--- gas/testsuite/gas/aarch64/sve-movprfx_25.s 2019-04-19 15:56:30.770025068 +0100
+++ gas/testsuite/gas/aarch64/sve-movprfx_25.s 2019-07-02 10:47:17.488158955 +0100
@@ -29,7 +29,7 @@ f:
movprfx z1.d, p1/m, z3.d
cpy z1.d, p1/m, x2
- /* Not OK, scalar but register z1 and x1 are architecturally the same. */
+ /* OK, scalar predicated, alias mov. */
movprfx z1.d, p1/m, z3.d
cpy z1.d, p1/m, x1
Index: gas/testsuite/gas/aarch64/sve-movprfx_25.d
===================================================================
--- gas/testsuite/gas/aarch64/sve-movprfx_25.d 2019-04-19 15:56:30.770025068 +0100
+++ gas/testsuite/gas/aarch64/sve-movprfx_25.d 2019-07-02 10:47:17.484158988 +0100
@@ -21,7 +21,7 @@ Disassembly of section .*:
[^:]+: 04d12461 movprfx z1.d, p1/m, z3.d
[^:]+: 05e8a441 mov z1.d, p1/m, x2
[^:]+: 04d12461 movprfx z1.d, p1/m, z3.d
-[^:]+: 05e8a421 mov z1.d, p1/m, x1 // note: output register of preceding `movprfx' used as input at operand 3
+[^:]+: 05e8a421 mov z1.d, p1/m, x1
[^:]+: 04d12461 movprfx z1.d, p1/m, z3.d
[^:]+: 05e08441 mov z1.d, p1/m, d2
[^:]+: 04d12461 movprfx z1.d, p1/m, z3.d
Index: gas/testsuite/gas/aarch64/sve-movprfx_25.l
===================================================================
--- gas/testsuite/gas/aarch64/sve-movprfx_25.l 2019-04-19 15:56:30.770025068 +0100
+++ gas/testsuite/gas/aarch64/sve-movprfx_25.l 2019-07-02 10:47:17.488158955 +0100
@@ -1,5 +1,4 @@
[^:]*: Assembler messages:
.*: Warning: predicate register differs from that in preceding `movprfx' at operand 2 -- `cpy z1.d,p9/m,#12'
.*: Warning: merging predicate expected due to preceding `movprfx' at operand 2 -- `cpy z1.d,p1/z,#12'
-.*: Warning: output register of preceding `movprfx' used as input at operand 3 -- `cpy z1.d,p1/m,x1'
.*: Warning: output register of preceding `movprfx' used as input at operand 3 -- `cpy z1.d,p1/m,d1'