aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorAndre Simoes Dias Vieira <andre.simoesdiasvieira@arm.com>2018-02-21 15:11:50 +0000
committerThomas Preud'homme <thomas.preudhomme@arm.com>2018-02-22 16:34:36 +0000
commit7bdf778b10b1ab85553a31c104097073214f6430 (patch)
tree60adec937aa2b6f43dd9f7116d23380c0698996b /gas/config
parent6b6b680700699c15e22b6c36975729035676eef1 (diff)
downloadgdb-7bdf778b10b1ab85553a31c104097073214f6430.zip
gdb-7bdf778b10b1ab85553a31c104097073214f6430.tar.gz
gdb-7bdf778b10b1ab85553a31c104097073214f6430.tar.bz2
Diagnose when trying to assemble conditional FP16 vmovx and vins
This patch makes GAS emit a warning when trying to assemble the Armv8.2 FP16 instructions VMOVX and VINS with condition codes. The Armv8-A Reference Manual specifies these instructions without conditional codes and says that if they are found in an IT block that they are CONSTRAINED UNPREDICABLE. gas/ChangeLog: 2018-02-22 Andre Vieira <andre.simoesdiasvieira@arm.com> * config/tc-arm.c (do_neon_movhf): If conditional error out when in arm mode and emit warning in thumb mode. * testsuite/gas/arm/armv8-2-fp16-scalar-bad.s: Add new tests. * testsuite/gas/arm/armv8-2-fp16-scalar-bad.l: Idem.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-arm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index cac4ed9..d6a923d 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -16772,6 +16772,20 @@ do_neon_movhf (void)
constraint (!ARM_CPU_HAS_FEATURE (cpu_variant, fpu_vfp_ext_armv8),
_(BAD_FPU));
+ if (inst.cond != COND_ALWAYS)
+ {
+ if (thumb_mode)
+ {
+ as_warn (_("ARMv8.2 scalar fp16 instruction cannot be conditional,"
+ " the behaviour is UNPREDICTABLE"));
+ }
+ else
+ {
+ inst.error = BAD_COND;
+ return;
+ }
+ }
+
do_vfp_sp_monadic ();
inst.is_neon = 1;