From 225f1684514d875f46291ecc595c479b4934a3d6 Mon Sep 17 00:00:00 2001 From: Joe Ramsay Date: Wed, 12 Aug 2020 16:44:54 +0100 Subject: [PATCH] gas: arm: Fix IT-predicated MVE vcvt * config/tc-arm.c (do_neon_cvt_1): Parse vcvtne as vcvt-ne for NS_FD shape when MVE is present * testsuite/gas/arm/mve-vcvtne-it-bad.d: New test. * testsuite/gas/arm/mve-vcvtne-it-bad.l: New test. * testsuite/gas/arm/mve-vcvtne-it-bad.s: New test. * testsuite/gas/arm/mve-vcvtne-it.d: New test. * testsuite/gas/arm/mve-vcvtne-it.s: New test. --- gas/config/tc-arm.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'gas/config/tc-arm.c') diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 5877847..2555921 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -19087,6 +19087,16 @@ do_neon_cvt_1 (enum neon_cvt_mode mode) return; } + if ((rs == NS_FD || rs == NS_QQI) && mode == neon_cvt_mode_n + && ARM_CPU_HAS_FEATURE (cpu_variant, mve_ext)) + { + /* We are dealing with vcvt with the 'ne' condition. */ + inst.cond = 0x1; + inst.instruction = N_MNEM_vcvt; + do_neon_cvt_1 (neon_cvt_mode_z); + return; + } + /* VFP rather than Neon conversions. */ if (flavour >= neon_cvt_flavour_first_fp) { @@ -19115,14 +19125,6 @@ do_neon_cvt_1 (enum neon_cvt_mode mode) NEON_CHECK_CC | NEON_CHECK_ARCH)) return; } - else if (mode == neon_cvt_mode_n) - { - /* We are dealing with vcvt with the 'ne' condition. */ - inst.cond = 0x1; - inst.instruction = N_MNEM_vcvt; - do_neon_cvt_1 (neon_cvt_mode_z); - return; - } /* fall through. */ case NS_DDI: { -- cgit v1.1