From 7e1050317266448c0496db46eadd546410b07c0a Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 28 Aug 2013 10:25:36 +0000 Subject: [PATCH] * aarch64-opc.c (aarch64_logical_immediate_p): Return FALSE if the immediate is not suitable for the 32-bit ABI. * gas/aarch64/illegal.s: Add illegal constant for logical operation. * gas/aarch64/illegal.l: Add expected error message. --- gas/testsuite/ChangeLog | 6 ++++++ gas/testsuite/gas/aarch64/illegal.l | 3 ++- gas/testsuite/gas/aarch64/illegal.s | 3 +++ opcodes/ChangeLog | 5 +++++ opcodes/aarch64-opc.c | 3 ++- 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index eb39f6b290..dd0fe7256e 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2013-08-28 Nick Clifton + + * gas/aarch64/illegal.s: Add illegal constant for logical + operation. + * gas/aarch64/illegal.l: Add expected error message. + 2013-08-23 Maciej W. Rozycki * gas/testsuite/gas/mips/micromips-insn32.d: Adjust for delay diff --git a/gas/testsuite/gas/aarch64/illegal.l b/gas/testsuite/gas/aarch64/illegal.l index d7740b9e26..e36b8fefb0 100644 --- a/gas/testsuite/gas/aarch64/illegal.l +++ b/gas/testsuite/gas/aarch64/illegal.l @@ -551,4 +551,5 @@ [^:]*:543: Error: .*`fmov s0,#0x11' [^:]*:544: Error: .*`fmov s0,#0xC0280000C1400000' [^:]*:545: Error: .*`fmov d0,#0xC02f800000000000' -[^:]*:550: Error: .* +[^:]*:550: Error: .*`ands w0,w24,#0xffeefffffffffffd' +[^:]*:553: Error: .* diff --git a/gas/testsuite/gas/aarch64/illegal.s b/gas/testsuite/gas/aarch64/illegal.s index d2bc08a9d1..a46946e892 100644 --- a/gas/testsuite/gas/aarch64/illegal.s +++ b/gas/testsuite/gas/aarch64/illegal.s @@ -547,4 +547,7 @@ // No 16-byte relocation ldr q0, =one_label + ands w0, w24, #0xffeefffffffffffd + one_label: + diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index ce6aebecf1..6966b95c27 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2013-08-28 Nick Clifton + + * aarch64-opc.c (aarch64_logical_immediate_p): Return FALSE if the + immediate is not suitable for the 32-bit ABI. + 2013-08-23 Maciej W. Rozycki * micromips-opc.c (micromips_opcodes): Use RD_4 for "alnv.ps", diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c index 74f2826035..f32ee5ec2f 100644 --- a/opcodes/aarch64-opc.c +++ b/opcodes/aarch64-opc.c @@ -1063,7 +1063,8 @@ aarch64_logical_immediate_p (uint64_t value, int is32, aarch64_insn *encoding) /* Allow all zeros or all ones in top 32-bits, so that constant expressions like ~1 are permitted. */ if (value >> 32 != 0 && value >> 32 != 0xffffffff) - return 0xffffffff; + return FALSE; + /* Replicate the 32 lower bits to the 32 upper bits. */ value &= 0xffffffff; value |= value << 32;