From 1f6234a335eab15c3ad878338b5256b5bdc190ab Mon Sep 17 00:00:00 2001 From: Andre Vieira Date: Thu, 16 May 2019 13:52:51 +0100 Subject: [PATCH] [PATCH 36/57][Arm][GAS] Add support for MVE instructions: wlstp, dlstp, letp and lctp gas/ChangeLog: 2019-05-16 Andre Vieira * config/tc-arm.c (T16_32_TAB): Add new instructions. (do_t_loloop): Changed to handle tail predication variants. (md_apply_fix): Likewise. (insns): Add entries for MVE mnemonics. * testsuite/gas/arm/mve-tailpredloop-bad.d: New test. * testsuite/gas/arm/mve-tailpredloop-bad.l: New test. * testsuite/gas/arm/mve-tailpredloop-bad.s: New test. * testsuite/gas/arm/mve-tailpredloop.d: New test. --- gas/ChangeLog | 11 ++ gas/config/tc-arm.c | 108 +++++++++++++------ gas/testsuite/gas/arm/mve-tailpredloop-bad.d | 5 + gas/testsuite/gas/arm/mve-tailpredloop-bad.l | 26 +++++ gas/testsuite/gas/arm/mve-tailpredloop-bad.s | 36 +++++++ 5 files changed, 152 insertions(+), 34 deletions(-) create mode 100644 gas/testsuite/gas/arm/mve-tailpredloop-bad.d create mode 100644 gas/testsuite/gas/arm/mve-tailpredloop-bad.l create mode 100644 gas/testsuite/gas/arm/mve-tailpredloop-bad.s diff --git a/gas/ChangeLog b/gas/ChangeLog index f7883edf584..e2cab99d797 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,14 @@ +2019-05-16 Andre Vieira + + * config/tc-arm.c (T16_32_TAB): Add new instructions. + (do_t_loloop): Changed to handle tail predication variants. + (md_apply_fix): Likewise. + (insns): Add entries for MVE mnemonics. + * testsuite/gas/arm/mve-tailpredloop-bad.d: New test. + * testsuite/gas/arm/mve-tailpredloop-bad.l: New test. + * testsuite/gas/arm/mve-tailpredloop-bad.s: New test. + * testsuite/gas/arm/mve-tailpredloop.d: New test. + 2019-05-16 Andre Vieira * config/tc-arm.c (do_mve_vshll): New encoding function. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index ab672c1fdbb..1bc15df1a98 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -11134,9 +11134,11 @@ encode_thumb32_addr_mode (int i, bfd_boolean is_t, bfd_boolean is_d) X(_cpy, 4600, ea4f0000), \ X(_dec_sp,80dd, f1ad0d00), \ X(_dls, 0000, f040e001), \ + X(_dlstp, 0000, f000e001), \ X(_eor, 4040, ea800000), \ X(_eors, 4040, ea900000), \ X(_inc_sp,00dd, f10d0d00), \ + X(_lctp, 0000, f00fe001), \ X(_ldmia, c800, e8900000), \ X(_ldr, 6800, f8500000), \ X(_ldrb, 7800, f8100000), \ @@ -11147,6 +11149,7 @@ encode_thumb32_addr_mode (int i, bfd_boolean is_t, bfd_boolean is_d) X(_ldr_pc2,4800, f85f0000), \ X(_ldr_sp,9800, f85d0000), \ X(_le, 0000, f00fc001), \ + X(_letp, 0000, f01fc001), \ X(_lsl, 0000, fa00f000), \ X(_lsls, 0000, fa10f000), \ X(_lsr, 0800, fa20f000), \ @@ -11189,6 +11192,7 @@ encode_thumb32_addr_mode (int i, bfd_boolean is_t, bfd_boolean is_d) X(_wfe, bf20, f3af8002), \ X(_wfi, bf30, f3af8003), \ X(_wls, 0000, f040c001), \ + X(_wlstp, 0000, f000c001), \ X(_sev, bf40, f3af8004), \ X(_sevl, bf50, f3af8005), \ X(_udf, de00, f7f0a000) @@ -14114,38 +14118,6 @@ v8_1_loop_reloc (int is_le) } } -/* To handle the Scalar Low Overhead Loop instructions - in Armv8.1-M Mainline. */ -static void -do_t_loloop (void) -{ - unsigned long insn = inst.instruction; - - set_pred_insn_type (OUTSIDE_PRED_INSN); - inst.instruction = THUMB_OP32 (inst.instruction); - - switch (insn) - { - case T_MNEM_le: - /* le