public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, GAS] No IT usage deprecation for ARMv8-M
@ 2017-12-01 14:40 Thomas Preudhomme
  2017-12-01 14:42 ` [PATCH, GAS] Enable conditional Armv8-M instructions Thomas Preudhomme
  2017-12-18 13:35 ` [PATCH, GAS] No IT usage deprecation for ARMv8-M Nick Clifton
  0 siblings, 2 replies; 9+ messages in thread
From: Thomas Preudhomme @ 2017-12-01 14:40 UTC (permalink / raw)
  To: Richard Earnshaw, Nick Clifton, Alan Modra, binutils

[-- Attachment #1: Type: text/plain, Size: 1329 bytes --]

Hi,

Deprecations related to the use of the IT instruction introduced in
Armv8-A do not apply to Armv8-M Baseline and mainline. However the
warning logic do not distinguish between the various profiles and warn
whenever the architecture version is 8.

This patch adds a check to exclude M profile architectures from this
warning. This works as expected when -march is specified on the
command-line or a .arch/.cpu directive exist. However, in autodetection
mode the CPU/architecture targeted is only known once the instructions
have been all processed but this code is run when IT instruction is
processed. It is therefore not possible to distinguish between Armv8-M
and Armv8-A in that mode.

The approach chosen here is not to warn in autodetection mode. The udf.d
testcase that relied on that behavior to test deprecation warning for
Armv8-A is therefore updated to explicitely pass -march=armv8-a.

ChangeLog entry is as follows:

*** gas/ChangeLog ***

2017-11-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/tc-arm.c (it_fsm_post_encode): Do not warn if targeting M
	profile architecture or if in autodetection mode.
	* testsuite/gas/arm/udf.d: Assemble for Armv8-A explicitely.

Testing: Ran testsuite targeting arm-none-eabi which shows no
regression.

Is this ok for master branch?

Best regards,

Thomas

[-- Attachment #2: no_it_deprecation_v8m.patch --]
[-- Type: text/x-patch, Size: 17900 bytes --]

diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 128ab38db69b81ac75a3a43d103c3bfce8ae82c1..27329dc7c9244115ee1322a18669deb24104af12 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -18543,12 +18543,13 @@ it_fsm_post_encode (void)
   if (now_it.insn_cond
       && !now_it.warn_deprecated
       && warn_on_deprecated
-      && ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v8))
+      && ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v8)
+      && !ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_m))
     {
       if (inst.instruction >= 0x10000)
 	{
 	  as_tsktsk (_("IT blocks containing 32-bit Thumb instructions are "
-		     "deprecated in ARMv8"));
+		     "performance deprecated in ARMv8-A and ARMv8-R"));
 	  now_it.warn_deprecated = TRUE;
 	}
       else
@@ -18559,9 +18560,10 @@ it_fsm_post_encode (void)
 	    {
 	      if ((inst.instruction & p->mask) == p->pattern)
 		{
-		  as_tsktsk (_("IT blocks containing 16-bit Thumb instructions "
-			     "of the following class are deprecated in ARMv8: "
-			     "%s"), p->description);
+		  as_tsktsk (_("IT blocks containing 16-bit Thumb "
+			       "instructions of the following class are "
+			       "performance deprecated in ARMv8-A and "
+			       "ARMv8-R: %s"), p->description);
 		  now_it.warn_deprecated = TRUE;
 		  break;
 		}
@@ -18573,7 +18575,8 @@ it_fsm_post_encode (void)
       if (now_it.block_length > 1)
 	{
 	  as_tsktsk (_("IT blocks containing more than one conditional "
-		     "instruction are deprecated in ARMv8"));
+		     "instruction are performance deprecated in ARMv8-A and "
+		     "ARMv8-R"));
 	  now_it.warn_deprecated = TRUE;
 	}
     }
diff --git a/gas/testsuite/gas/arm/armv8-ar-bad.l b/gas/testsuite/gas/arm/armv8-ar-bad.l
index ae9a3d1add9cb3839fb1202561f11afc0915af73..f70de3588315a54cd612e25fcfe8fcdf0be10dc1 100644
--- a/gas/testsuite/gas/arm/armv8-ar-bad.l
+++ b/gas/testsuite/gas/arm/armv8-ar-bad.l
@@ -10,7 +10,7 @@
 .*:23: Error: immediate value out of range -- `hlt 0x10000'
 .*:24: Error: instruction cannot be conditional -- `hltne 0x1'
 .*:28: Error: immediate value out of range -- `hlt 64'
-.*:30: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Miscellaneous 16-bit instructions
+.*:30: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Miscellaneous 16-bit instructions
 .*:30: Error: instruction is always unconditional -- `hltne 0'
 .*:34: Error: r15 not allowed here -- `stlb pc,\[r0\]'
 .*:35: Error: r15 not allowed here -- `stlb r0,\[pc\]'
diff --git a/gas/testsuite/gas/arm/armv8-ar-it-bad.l b/gas/testsuite/gas/arm/armv8-ar-it-bad.l
index a69938dfce65f71ec231fd12813a1947f3cdf6c4..de3ed973a247ad148cf6282a8b4b54505fb311d6 100644
--- a/gas/testsuite/gas/arm/armv8-ar-it-bad.l
+++ b/gas/testsuite/gas/arm/armv8-ar-it-bad.l
@@ -1,18 +1,18 @@
 .*: Assembler messages:
-.*:6: IT blocks containing 32-bit Thumb instructions are deprecated in ARMv8
-.*:14: IT blocks containing more than one conditional instruction are deprecated in ARMv8
-.*:19: IT blocks containing more than one conditional instruction are deprecated in ARMv8
-.*:29: IT blocks containing 32-bit Thumb instructions are deprecated in ARMv8
-.*:35: IT blocks containing more than one conditional instruction are deprecated in ARMv8
-.*:39: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-.*:42: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Miscellaneous 16-bit instructions
-.*:48: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Literal loads
-.*:51: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Hi-register ADD, MOV, CMP, BX, BLX using pc
-.*:54: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
+.*:6: IT blocks containing 32-bit Thumb instructions are performance deprecated in ARMv8-A and ARMv8-R
+.*:14: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
+.*:19: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
+.*:29: IT blocks containing 32-bit Thumb instructions are performance deprecated in ARMv8-A and ARMv8-R
+.*:35: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
+.*:39: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+.*:42: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Miscellaneous 16-bit instructions
+.*:48: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Literal loads
+.*:51: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Hi-register ADD, MOV, CMP, BX, BLX using pc
+.*:54: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
 .*:54: Error: r15 not allowed here -- `addeq r0,pc,pc'
-.*:57: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
+.*:57: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
 .*:57: Error: r15 not allowed here -- `addeq pc,r0,r0'
-.*:60: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: ADD/SUB sp, sp #imm
-.*:64: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: ADD/SUB sp, sp #imm
-.*:67: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: ADD/SUB sp, sp #imm
-.*:71: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: ADD/SUB sp, sp #imm
+.*:60: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: ADD/SUB sp, sp #imm
+.*:64: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: ADD/SUB sp, sp #imm
+.*:67: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: ADD/SUB sp, sp #imm
+.*:71: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: ADD/SUB sp, sp #imm
diff --git a/gas/testsuite/gas/arm/sp-pc-validations-bad-t-v8a.l b/gas/testsuite/gas/arm/sp-pc-validations-bad-t-v8a.l
index 0da47017e4b0c75169cb3a3953b8d0b308f129ea..07261005b1262a6db468433e976cc9b8a531fffd 100644
--- a/gas/testsuite/gas/arm/sp-pc-validations-bad-t-v8a.l
+++ b/gas/testsuite/gas/arm/sp-pc-validations-bad-t-v8a.l
@@ -1,48 +1,48 @@
 [^:]*: Assembler messages:
-[^:]*:27: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:27: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:27: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:27: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:27: Error: branch must be last instruction in IT block -- `ldreq r15,\[r0\]'
-[^:]*:28: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:28: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:28: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:28: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:28: Error: branch must be last instruction in IT block -- `ldreq r15,\[r0,#0\]'
-[^:]*:29: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:29: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:29: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:29: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:29: Error: branch must be last instruction in IT block -- `ldreq r15,\[sp\]'
-[^:]*:30: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:30: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:30: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:30: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:30: Error: branch must be last instruction in IT block -- `ldreq r15,\[sp,#0\]'
-[^:]*:31: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:31: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:31: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:31: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:31: Error: branch must be last instruction in IT block -- `ldreq.w r15,\[r0\]'
-[^:]*:32: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:32: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:32: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:32: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:32: Error: branch must be last instruction in IT block -- `ldreq.w r15,\[r0,#0\]'
-[^:]*:33: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:33: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:33: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:33: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:33: Error: branch must be last instruction in IT block -- `ldreq r15,\[r0,#-4\]'
-[^:]*:34: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:34: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:34: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:34: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:34: Error: branch must be last instruction in IT block -- `ldreq r15,\[r0\],#4'
-[^:]*:35: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:35: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:35: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:35: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:35: Error: branch must be last instruction in IT block -- `ldreq r15,\[r0,#0\]!'
-[^:]*:38: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:38: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:38: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:38: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:38: Error: branch must be last instruction in IT block -- `ldreq r15,label'
-[^:]*:39: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:39: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:39: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:39: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:39: Error: branch must be last instruction in IT block -- `ldreq.w r15,label'
-[^:]*:40: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:40: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:40: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:40: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:40: Error: branch must be last instruction in IT block -- `ldreq.w r15,\[pc,#-0\]'
-[^:]*:43: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:43: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:43: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:43: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:43: Error: branch must be last instruction in IT block -- `ldreq r15,\[r0,r1\]'
-[^:]*:44: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:44: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:44: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:44: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:44: Error: branch must be last instruction in IT block -- `ldreq.w r15,\[r0,r1\]'
-[^:]*:45: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:45: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:45: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:45: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:45: Error: branch must be last instruction in IT block -- `ldreq.w r15,\[r0,r1,LSL#2\]'
 [^:]*:48: Error: r15 not allowed here -- `ldrb pc,\[r0,#4\]'
 [^:]*:51: Error: r15 not allowed here -- `ldrb.w pc,\[r0,#4\]'
diff --git a/gas/testsuite/gas/arm/udf.d b/gas/testsuite/gas/arm/udf.d
index db41080f415158d32396782627b10c8473216f9c..04e31451d6c368db220d1576c3042151810ef005 100644
--- a/gas/testsuite/gas/arm/udf.d
+++ b/gas/testsuite/gas/arm/udf.d
@@ -1,5 +1,6 @@
 #objdump: -dr --prefix-addresses --show-raw-insn
 #name: UDF
+#as: -march=armv8-a
 #error-output: udf.l
 
 .*: +file format .*arm.*
diff --git a/gas/testsuite/gas/arm/udf.l b/gas/testsuite/gas/arm/udf.l
index 2e154b6fc21051117c038c75cc00bc8b5e28aa95..21aff94de5194aaac0b33f07e1920a23f8380670 100644
--- a/gas/testsuite/gas/arm/udf.l
+++ b/gas/testsuite/gas/arm/udf.l
@@ -1,3 +1,3 @@
 ^[^:]*: Assembler messages:
-^[^:]*:16: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-^[^:]*:21: IT blocks containing 32-bit Thumb instructions are deprecated in ARMv8
+^[^:]*:16: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+^[^:]*:21: IT blocks containing 32-bit Thumb instructions are performance deprecated in ARMv8-A and ARMv8-R

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH, GAS] Enable conditional Armv8-M instructions
  2017-12-01 14:40 [PATCH, GAS] No IT usage deprecation for ARMv8-M Thomas Preudhomme
@ 2017-12-01 14:42 ` Thomas Preudhomme
  2017-12-01 14:50   ` [PATCH, GAS] Add new macro for Thumb-only opcodes Thomas Preudhomme
  2017-12-18 13:36   ` [PATCH, GAS] Enable conditional Armv8-M instructions Nick Clifton
  2017-12-18 13:35 ` [PATCH, GAS] No IT usage deprecation for ARMv8-M Nick Clifton
  1 sibling, 2 replies; 9+ messages in thread
From: Thomas Preudhomme @ 2017-12-01 14:42 UTC (permalink / raw)
  To: Richard Earnshaw, Nick Clifton, Alan Modra, binutils

[-- Attachment #1: Type: text/plain, Size: 806 bytes --]

Hi,

Newly introduced instructions common to ARMv8-M Baseline and Mainline
are currently all marked as unconditional. However, all instructions but
sg (ie. blxns, bxns, tt, ttt, tta, ttat, vlldm and vlstm) do actually
support conditional execution. This patch fixes the definition of these
instructions accordingly.

ChangeLog entries are as follows:

*** gas/ChangeLog ***

2017-11-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/tc-arm.c (insns): Make blxns, bxns, tt, ttt, tta, ttat, vlldm
	and vlstm conditionally executable and reindent parameters.
	* testsuite/gas/arm/archv8m-cmse-main.s: Add conditional version of
	aforementionned instructions.

Testing: Testsuite run when targeting arm-none-eabi targets shows no
regressions.

Is this ok for master branch?

Best regards,

Thomas

[-- Attachment #2: enable_v8m_conditional_insns.patch --]
[-- Type: text/x-patch, Size: 1997 bytes --]

diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index f224104f406724e26d3fb241f3be35e96fb8a15d..17eded3524fad042b65434c4a783de4ec69c4ade 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -21429,20 +21429,20 @@ static const struct asm_opcode insns[] =
 #define ARM_VARIANT NULL
 #undef  THUMB_VARIANT
 #define THUMB_VARIANT & arm_ext_v8m
- TUE("sg", 0, e97fe97f, 0, (), 0, noargs),
- TUE("blxns", 0, 4784, 1, (RRnpc), 0, t_blx),
- TUE("bxns", 0, 4704, 1, (RRnpc), 0, t_bx),
- TUE("tt", 0, e840f000, 2, (RRnpc, RRnpc), 0, tt),
- TUE("ttt", 0, e840f040, 2, (RRnpc, RRnpc), 0, tt),
- TUE("tta", 0, e840f080, 2, (RRnpc, RRnpc), 0, tt),
- TUE("ttat", 0, e840f0c0, 2, (RRnpc, RRnpc), 0, tt),
+ TUE("sg",    0, e97fe97f, 0, (),	      0, noargs),
+ TCE("blxns", 0, 4784,	   1, (RRnpc),	      0, t_blx),
+ TCE("bxns",  0, 4704,	   1, (RRnpc),	      0, t_bx),
+ TCE("tt",    0, e840f000, 2, (RRnpc, RRnpc), 0, tt),
+ TCE("ttt",   0, e840f040, 2, (RRnpc, RRnpc), 0, tt),
+ TCE("tta",   0, e840f080, 2, (RRnpc, RRnpc), 0, tt),
+ TCE("ttat",  0, e840f0c0, 2, (RRnpc, RRnpc), 0, tt),
 
  /* FP for ARMv8-M Mainline.  Enabled for ARMv8-M Mainline because the
     instructions behave as nop if no VFP is present.  */
 #undef  THUMB_VARIANT
 #define THUMB_VARIANT & arm_ext_v8m_main
- TUEc("vlldm",	0,	 ec300a00, 1, (RRnpc),	rn),
- TUEc("vlstm",	0,	 ec200a00, 1, (RRnpc),	rn),
+ TCE("vlldm", 0, ec300a00, 1, (RRnpc), 0, rn),
+ TCE("vlstm", 0, ec200a00, 1, (RRnpc), 0, rn),
 };
 #undef ARM_VARIANT
 #undef THUMB_VARIANT
diff --git a/gas/testsuite/gas/arm/archv8m-cmse-main.s b/gas/testsuite/gas/arm/archv8m-cmse-main.s
index 871414fd19fe6fcd95284e2f7089275c696b716a..4f7ff5d9b1b22b35a49403f3795ce7bde0b5c023 100644
--- a/gas/testsuite/gas/arm/archv8m-cmse-main.s
+++ b/gas/testsuite/gas/arm/archv8m-cmse-main.s
@@ -2,5 +2,14 @@
 .syntax unified
 
 T:
-vlldm r1
-vlstm r2
+vlldm	r1
+vlstm	r2
+it	ne
+blxnsne	r4
+it	ne
+bxnsne	r4
+itttt	ne
+ttane	r0, r1
+ttane	r8, r9
+ttatne	r0, r1
+ttatne	r8, r9

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH, GAS] Add new macro for Thumb-only opcodes
  2017-12-01 14:42 ` [PATCH, GAS] Enable conditional Armv8-M instructions Thomas Preudhomme
@ 2017-12-01 14:50   ` Thomas Preudhomme
  2017-12-18 13:37     ` Nick Clifton
  2017-12-18 13:36   ` [PATCH, GAS] Enable conditional Armv8-M instructions Nick Clifton
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Preudhomme @ 2017-12-01 14:50 UTC (permalink / raw)
  To: Richard Earnshaw, Nick Clifton, Alan Modra, binutils

[-- Attachment #1: Type: text/plain, Size: 680 bytes --]

Hi,

Armv8-M Security Extensions introduced some Thumb-only opcodes
(eg. sg). These are defined using the TUE and TCE macros, setting the
Arm execution state related fields to 0/NULL.

This patch adds 2 new macros to avoid filling this field and clearly
identify Thumb-only instructions.

ChangeLog entry is as follows:

*** gas/ChangeLog ***

2017-11-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/tc-arm.c (ToC): Define macro.
	(ToU): Likewise.
	(insns): Make use of above macros for new instructions introduced in
	Armv8-M.

Testing: Testsuite run while targeting arm-none-eabi systems shows no
regression.

Is this ok for master branch?

Best regards,

Thomas

[-- Attachment #2: add_macro_thumb-only_opcode.patch --]
[-- Type: text/x-patch, Size: 2242 bytes --]

diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 17eded3524fad042b65434c4a783de4ec69c4ade..c304fa61769e6de8a9278fe6fcb5b2f174e614c0 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -19395,6 +19395,17 @@ static struct asm_barrier_opt barrier_opt_names[] =
 #define C3(mnem, op, nops, ops, ae)	\
   { #mnem, OPS##nops ops, OT_cinfix3, 0x##op, 0x0, ARM_VARIANT, 0, do_##ae, NULL }
 
+/* Thumb-only variants of TCE and TUE.  */
+#define ToC(mnem, top, nops, ops, te) \
+  { mnem, OPS##nops ops, OT_csuffix, 0x0, 0x##top, 0, THUMB_VARIANT, NULL, \
+    do_##te }
+      //TCE (mnem, 0, top, nops, ops, NULL, te)
+
+#define ToU(mnem, top, nops, ops, te) \
+  { mnem, OPS##nops ops, OT_unconditional, 0x0, 0x##top, 0, THUMB_VARIANT, \
+    NULL, do_##te }
+      //TUE(mnem, 0, top, nops, ops, NULL, te)
+
 /* Legacy mnemonics that always have conditional infix after the third
    character.  */
 #define CL(mnem, op, nops, ops, ae)	\
@@ -21429,20 +21440,20 @@ static const struct asm_opcode insns[] =
 #define ARM_VARIANT NULL
 #undef  THUMB_VARIANT
 #define THUMB_VARIANT & arm_ext_v8m
- TUE("sg",    0, e97fe97f, 0, (),	      0, noargs),
- TCE("blxns", 0, 4784,	   1, (RRnpc),	      0, t_blx),
- TCE("bxns",  0, 4704,	   1, (RRnpc),	      0, t_bx),
- TCE("tt",    0, e840f000, 2, (RRnpc, RRnpc), 0, tt),
- TCE("ttt",   0, e840f040, 2, (RRnpc, RRnpc), 0, tt),
- TCE("tta",   0, e840f080, 2, (RRnpc, RRnpc), 0, tt),
- TCE("ttat",  0, e840f0c0, 2, (RRnpc, RRnpc), 0, tt),
+ ToU("sg",    e97fe97f,	0, (),		   noargs),
+ ToC("blxns", 4784,	1, (RRnpc),	   t_blx),
+ ToC("bxns",  4704,	1, (RRnpc),	   t_bx),
+ ToC("tt",    e840f000,	2, (RRnpc, RRnpc), tt),
+ ToC("ttt",   e840f040,	2, (RRnpc, RRnpc), tt),
+ ToC("tta",   e840f080,	2, (RRnpc, RRnpc), tt),
+ ToC("ttat",  e840f0c0,	2, (RRnpc, RRnpc), tt),
 
  /* FP for ARMv8-M Mainline.  Enabled for ARMv8-M Mainline because the
     instructions behave as nop if no VFP is present.  */
 #undef  THUMB_VARIANT
 #define THUMB_VARIANT & arm_ext_v8m_main
- TCE("vlldm", 0, ec300a00, 1, (RRnpc), 0, rn),
- TCE("vlstm", 0, ec200a00, 1, (RRnpc), 0, rn),
+ ToC("vlldm", ec300a00, 1, (RRnpc), rn),
+ ToC("vlstm", ec200a00, 1, (RRnpc), rn),
 };
 #undef ARM_VARIANT
 #undef THUMB_VARIANT

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, GAS] No IT usage deprecation for ARMv8-M
  2017-12-01 14:40 [PATCH, GAS] No IT usage deprecation for ARMv8-M Thomas Preudhomme
  2017-12-01 14:42 ` [PATCH, GAS] Enable conditional Armv8-M instructions Thomas Preudhomme
@ 2017-12-18 13:35 ` Nick Clifton
  2018-01-15 14:25   ` Thomas Preudhomme
  1 sibling, 1 reply; 9+ messages in thread
From: Nick Clifton @ 2017-12-18 13:35 UTC (permalink / raw)
  To: Thomas Preudhomme, Richard Earnshaw, Alan Modra, binutils

Hi Thomas,

> 2017-11-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
> 
>     * config/tc-arm.c (it_fsm_post_encode): Do not warn if targeting M
>     profile architecture or if in autodetection mode.
>     * testsuite/gas/arm/udf.d: Assemble for Armv8-A explicitely.

Approved - please apply.

Cheers
  Nick

PS.  Sorry for the delay in reviewing.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, GAS] Enable conditional Armv8-M instructions
  2017-12-01 14:42 ` [PATCH, GAS] Enable conditional Armv8-M instructions Thomas Preudhomme
  2017-12-01 14:50   ` [PATCH, GAS] Add new macro for Thumb-only opcodes Thomas Preudhomme
@ 2017-12-18 13:36   ` Nick Clifton
  1 sibling, 0 replies; 9+ messages in thread
From: Nick Clifton @ 2017-12-18 13:36 UTC (permalink / raw)
  To: Thomas Preudhomme, Richard Earnshaw, Alan Modra, binutils

Hi Thomas,

> 2017-11-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
> 
>     * config/tc-arm.c (insns): Make blxns, bxns, tt, ttt, tta, ttat, vlldm
>     and vlstm conditionally executable and reindent parameters.
>     * testsuite/gas/arm/archv8m-cmse-main.s: Add conditional version of
>     aforementionned instructions.


Approved - please apply.

Cheers
  Nick

PS.  Sorry for the delay in reviewing.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, GAS] Add new macro for Thumb-only opcodes
  2017-12-01 14:50   ` [PATCH, GAS] Add new macro for Thumb-only opcodes Thomas Preudhomme
@ 2017-12-18 13:37     ` Nick Clifton
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Clifton @ 2017-12-18 13:37 UTC (permalink / raw)
  To: Thomas Preudhomme, Richard Earnshaw, Alan Modra, binutils

Hi Thomas,

> 2017-11-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
> 
>     * config/tc-arm.c (ToC): Define macro.
>     (ToU): Likewise.
>     (insns): Make use of above macros for new instructions introduced in

Approved - please apply.

Cheers
  Nick

PS.  Sorry for the delay in reviewing.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, GAS] No IT usage deprecation for ARMv8-M
  2017-12-18 13:35 ` [PATCH, GAS] No IT usage deprecation for ARMv8-M Nick Clifton
@ 2018-01-15 14:25   ` Thomas Preudhomme
  2018-01-15 14:41     ` Thomas Preudhomme
  2018-01-16 11:22     ` Nick Clifton
  0 siblings, 2 replies; 9+ messages in thread
From: Thomas Preudhomme @ 2018-01-15 14:25 UTC (permalink / raw)
  To: Nick Clifton, Richard Earnshaw, Alan Modra, binutils, Tristan Gingold

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

TL;DR: Committed with updated ChangeLog, is it ok for binutils 2.30?

Sorry for the delay (Christmas holidays), just committed it now. I realized the 
ChangeLog entry was incomplete so I updated it:

     2018-01-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>

     gas/
         * config/tc-arm.c (it_fsm_post_encode): Do not warn if targeting M
         profile architecture or if in autodetection mode.  Clarify that
         deprecation is for performance reason and concerns Armv8-A and Armv8-R.
         * testsuite/gas/arm/armv8-ar-bad.l: Adapt to new IT deprecation warning
         message.
         * testsuite/gas/arm/armv8-ar-it-bad.l: Likewise.
         * testsuite/gas/arm/sp-pc-validations-bad-t-v8a.l: Likewise.
         * testsuite/gas/arm/udf.l: Likewise.
         * testsuite/gas/arm/udf.d: Assemble for Armv8-A explicitely.

Other than that patch is unchanged.


@Tristan: is this fix ok for Binutils 2.30? It fixes 2 mistakes in an error 
message: IT is not deprecated for Armv8-M and it is only performance deprecated 
for Armv8-A and Armv8-R.

Best regards,

Thomas

On 18/12/17 13:35, Nick Clifton wrote:
> Hi Thomas,
> 
>> 2017-11-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
>>
>>      * config/tc-arm.c (it_fsm_post_encode): Do not warn if targeting M
>>      profile architecture or if in autodetection mode.
>>      * testsuite/gas/arm/udf.d: Assemble for Armv8-A explicitely.
> 
> Approved - please apply.
> 
> Cheers
>    Nick
> 
> PS.  Sorry for the delay in reviewing.
> 

[-- Attachment #2: no_it_deprecation_v8m.patch --]
[-- Type: text/x-patch, Size: 17900 bytes --]

diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 128ab38db69b81ac75a3a43d103c3bfce8ae82c1..27329dc7c9244115ee1322a18669deb24104af12 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -18543,12 +18543,13 @@ it_fsm_post_encode (void)
   if (now_it.insn_cond
       && !now_it.warn_deprecated
       && warn_on_deprecated
-      && ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v8))
+      && ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v8)
+      && !ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_m))
     {
       if (inst.instruction >= 0x10000)
 	{
 	  as_tsktsk (_("IT blocks containing 32-bit Thumb instructions are "
-		     "deprecated in ARMv8"));
+		     "performance deprecated in ARMv8-A and ARMv8-R"));
 	  now_it.warn_deprecated = TRUE;
 	}
       else
@@ -18559,9 +18560,10 @@ it_fsm_post_encode (void)
 	    {
 	      if ((inst.instruction & p->mask) == p->pattern)
 		{
-		  as_tsktsk (_("IT blocks containing 16-bit Thumb instructions "
-			     "of the following class are deprecated in ARMv8: "
-			     "%s"), p->description);
+		  as_tsktsk (_("IT blocks containing 16-bit Thumb "
+			       "instructions of the following class are "
+			       "performance deprecated in ARMv8-A and "
+			       "ARMv8-R: %s"), p->description);
 		  now_it.warn_deprecated = TRUE;
 		  break;
 		}
@@ -18573,7 +18575,8 @@ it_fsm_post_encode (void)
       if (now_it.block_length > 1)
 	{
 	  as_tsktsk (_("IT blocks containing more than one conditional "
-		     "instruction are deprecated in ARMv8"));
+		     "instruction are performance deprecated in ARMv8-A and "
+		     "ARMv8-R"));
 	  now_it.warn_deprecated = TRUE;
 	}
     }
diff --git a/gas/testsuite/gas/arm/armv8-ar-bad.l b/gas/testsuite/gas/arm/armv8-ar-bad.l
index ae9a3d1add9cb3839fb1202561f11afc0915af73..f70de3588315a54cd612e25fcfe8fcdf0be10dc1 100644
--- a/gas/testsuite/gas/arm/armv8-ar-bad.l
+++ b/gas/testsuite/gas/arm/armv8-ar-bad.l
@@ -10,7 +10,7 @@
 .*:23: Error: immediate value out of range -- `hlt 0x10000'
 .*:24: Error: instruction cannot be conditional -- `hltne 0x1'
 .*:28: Error: immediate value out of range -- `hlt 64'
-.*:30: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Miscellaneous 16-bit instructions
+.*:30: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Miscellaneous 16-bit instructions
 .*:30: Error: instruction is always unconditional -- `hltne 0'
 .*:34: Error: r15 not allowed here -- `stlb pc,\[r0\]'
 .*:35: Error: r15 not allowed here -- `stlb r0,\[pc\]'
diff --git a/gas/testsuite/gas/arm/armv8-ar-it-bad.l b/gas/testsuite/gas/arm/armv8-ar-it-bad.l
index a69938dfce65f71ec231fd12813a1947f3cdf6c4..de3ed973a247ad148cf6282a8b4b54505fb311d6 100644
--- a/gas/testsuite/gas/arm/armv8-ar-it-bad.l
+++ b/gas/testsuite/gas/arm/armv8-ar-it-bad.l
@@ -1,18 +1,18 @@
 .*: Assembler messages:
-.*:6: IT blocks containing 32-bit Thumb instructions are deprecated in ARMv8
-.*:14: IT blocks containing more than one conditional instruction are deprecated in ARMv8
-.*:19: IT blocks containing more than one conditional instruction are deprecated in ARMv8
-.*:29: IT blocks containing 32-bit Thumb instructions are deprecated in ARMv8
-.*:35: IT blocks containing more than one conditional instruction are deprecated in ARMv8
-.*:39: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-.*:42: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Miscellaneous 16-bit instructions
-.*:48: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Literal loads
-.*:51: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Hi-register ADD, MOV, CMP, BX, BLX using pc
-.*:54: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
+.*:6: IT blocks containing 32-bit Thumb instructions are performance deprecated in ARMv8-A and ARMv8-R
+.*:14: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
+.*:19: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
+.*:29: IT blocks containing 32-bit Thumb instructions are performance deprecated in ARMv8-A and ARMv8-R
+.*:35: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
+.*:39: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+.*:42: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Miscellaneous 16-bit instructions
+.*:48: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Literal loads
+.*:51: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Hi-register ADD, MOV, CMP, BX, BLX using pc
+.*:54: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
 .*:54: Error: r15 not allowed here -- `addeq r0,pc,pc'
-.*:57: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
+.*:57: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
 .*:57: Error: r15 not allowed here -- `addeq pc,r0,r0'
-.*:60: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: ADD/SUB sp, sp #imm
-.*:64: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: ADD/SUB sp, sp #imm
-.*:67: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: ADD/SUB sp, sp #imm
-.*:71: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: ADD/SUB sp, sp #imm
+.*:60: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: ADD/SUB sp, sp #imm
+.*:64: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: ADD/SUB sp, sp #imm
+.*:67: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: ADD/SUB sp, sp #imm
+.*:71: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: ADD/SUB sp, sp #imm
diff --git a/gas/testsuite/gas/arm/sp-pc-validations-bad-t-v8a.l b/gas/testsuite/gas/arm/sp-pc-validations-bad-t-v8a.l
index 0da47017e4b0c75169cb3a3953b8d0b308f129ea..07261005b1262a6db468433e976cc9b8a531fffd 100644
--- a/gas/testsuite/gas/arm/sp-pc-validations-bad-t-v8a.l
+++ b/gas/testsuite/gas/arm/sp-pc-validations-bad-t-v8a.l
@@ -1,48 +1,48 @@
 [^:]*: Assembler messages:
-[^:]*:27: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:27: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:27: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:27: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:27: Error: branch must be last instruction in IT block -- `ldreq r15,\[r0\]'
-[^:]*:28: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:28: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:28: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:28: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:28: Error: branch must be last instruction in IT block -- `ldreq r15,\[r0,#0\]'
-[^:]*:29: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:29: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:29: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:29: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:29: Error: branch must be last instruction in IT block -- `ldreq r15,\[sp\]'
-[^:]*:30: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:30: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:30: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:30: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:30: Error: branch must be last instruction in IT block -- `ldreq r15,\[sp,#0\]'
-[^:]*:31: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:31: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:31: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:31: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:31: Error: branch must be last instruction in IT block -- `ldreq.w r15,\[r0\]'
-[^:]*:32: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:32: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:32: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:32: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:32: Error: branch must be last instruction in IT block -- `ldreq.w r15,\[r0,#0\]'
-[^:]*:33: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:33: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:33: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:33: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:33: Error: branch must be last instruction in IT block -- `ldreq r15,\[r0,#-4\]'
-[^:]*:34: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:34: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:34: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:34: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:34: Error: branch must be last instruction in IT block -- `ldreq r15,\[r0\],#4'
-[^:]*:35: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:35: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:35: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:35: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:35: Error: branch must be last instruction in IT block -- `ldreq r15,\[r0,#0\]!'
-[^:]*:38: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:38: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:38: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:38: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:38: Error: branch must be last instruction in IT block -- `ldreq r15,label'
-[^:]*:39: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:39: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:39: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:39: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:39: Error: branch must be last instruction in IT block -- `ldreq.w r15,label'
-[^:]*:40: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:40: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:40: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:40: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:40: Error: branch must be last instruction in IT block -- `ldreq.w r15,\[pc,#-0\]'
-[^:]*:43: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:43: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:43: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:43: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:43: Error: branch must be last instruction in IT block -- `ldreq r15,\[r0,r1\]'
-[^:]*:44: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:44: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:44: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:44: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:44: Error: branch must be last instruction in IT block -- `ldreq.w r15,\[r0,r1\]'
-[^:]*:45: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-[^:]*:45: IT blocks containing more than one conditional instruction are deprecated in ARMv8
+[^:]*:45: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+[^:]*:45: IT blocks containing more than one conditional instruction are performance deprecated in ARMv8-A and ARMv8-R
 [^:]*:45: Error: branch must be last instruction in IT block -- `ldreq.w r15,\[r0,r1,LSL#2\]'
 [^:]*:48: Error: r15 not allowed here -- `ldrb pc,\[r0,#4\]'
 [^:]*:51: Error: r15 not allowed here -- `ldrb.w pc,\[r0,#4\]'
diff --git a/gas/testsuite/gas/arm/udf.d b/gas/testsuite/gas/arm/udf.d
index db41080f415158d32396782627b10c8473216f9c..04e31451d6c368db220d1576c3042151810ef005 100644
--- a/gas/testsuite/gas/arm/udf.d
+++ b/gas/testsuite/gas/arm/udf.d
@@ -1,5 +1,6 @@
 #objdump: -dr --prefix-addresses --show-raw-insn
 #name: UDF
+#as: -march=armv8-a
 #error-output: udf.l
 
 .*: +file format .*arm.*
diff --git a/gas/testsuite/gas/arm/udf.l b/gas/testsuite/gas/arm/udf.l
index 2e154b6fc21051117c038c75cc00bc8b5e28aa95..21aff94de5194aaac0b33f07e1920a23f8380670 100644
--- a/gas/testsuite/gas/arm/udf.l
+++ b/gas/testsuite/gas/arm/udf.l
@@ -1,3 +1,3 @@
 ^[^:]*: Assembler messages:
-^[^:]*:16: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
-^[^:]*:21: IT blocks containing 32-bit Thumb instructions are deprecated in ARMv8
+^[^:]*:16: IT blocks containing 16-bit Thumb instructions of the following class are performance deprecated in ARMv8-A and ARMv8-R: Short branches, Undefined, SVC, LDM/STM
+^[^:]*:21: IT blocks containing 32-bit Thumb instructions are performance deprecated in ARMv8-A and ARMv8-R

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, GAS] No IT usage deprecation for ARMv8-M
  2018-01-15 14:25   ` Thomas Preudhomme
@ 2018-01-15 14:41     ` Thomas Preudhomme
  2018-01-16 11:22     ` Nick Clifton
  1 sibling, 0 replies; 9+ messages in thread
From: Thomas Preudhomme @ 2018-01-15 14:41 UTC (permalink / raw)
  To: Nick Clifton, Richard Earnshaw, Alan Modra, binutils

Hi,

On 15/01/18 14:25, Thomas Preudhomme wrote:
> TL;DR: Committed with updated ChangeLog, is it ok for binutils 2.30?
> 
> Sorry for the delay (Christmas holidays), just committed it now. I realized the 
> ChangeLog entry was incomplete so I updated it:
> 
>      2018-01-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
> 
>      gas/
>          * config/tc-arm.c (it_fsm_post_encode): Do not warn if targeting M
>          profile architecture or if in autodetection mode.  Clarify that
>          deprecation is for performance reason and concerns Armv8-A and Armv8-R.
>          * testsuite/gas/arm/armv8-ar-bad.l: Adapt to new IT deprecation warning
>          message.
>          * testsuite/gas/arm/armv8-ar-it-bad.l: Likewise.
>          * testsuite/gas/arm/sp-pc-validations-bad-t-v8a.l: Likewise.
>          * testsuite/gas/arm/udf.l: Likewise.
>          * testsuite/gas/arm/udf.d: Assemble for Armv8-A explicitely.
> 
> Other than that patch is unchanged.
> 
> 
> @Tristan: is this fix ok for Binutils 2.30? It fixes 2 mistakes in an error 
> message: IT is not deprecated for Armv8-M and it is only performance deprecated 
> for Armv8-A and Armv8-R.

My apologies, s/Tristan/Nick/. Force of habit.

Best regards,

Thomas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, GAS] No IT usage deprecation for ARMv8-M
  2018-01-15 14:25   ` Thomas Preudhomme
  2018-01-15 14:41     ` Thomas Preudhomme
@ 2018-01-16 11:22     ` Nick Clifton
  1 sibling, 0 replies; 9+ messages in thread
From: Nick Clifton @ 2018-01-16 11:22 UTC (permalink / raw)
  To: Thomas Preudhomme, Richard Earnshaw, Alan Modra, binutils,
	Tristan Gingold

Hi Thomas,

>     2018-01-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
> 
>     gas/
>         * config/tc-arm.c (it_fsm_post_encode): Do not warn if targeting M
>         profile architecture or if in autodetection mode.  Clarify that
>         deprecation is for performance reason and concerns Armv8-A and Armv8-R.
>         * testsuite/gas/arm/armv8-ar-bad.l: Adapt to new IT deprecation warning
>         message.
>         * testsuite/gas/arm/armv8-ar-it-bad.l: Likewise.
>         * testsuite/gas/arm/sp-pc-validations-bad-t-v8a.l: Likewise.
>         * testsuite/gas/arm/udf.l: Likewise.
>         * testsuite/gas/arm/udf.d: Assemble for Armv8-A explicitely.

> @Nick: is this fix ok for Binutils 2.30? 

Patch approved for the branch.

Cheers
  Nick


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-01-16 11:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-01 14:40 [PATCH, GAS] No IT usage deprecation for ARMv8-M Thomas Preudhomme
2017-12-01 14:42 ` [PATCH, GAS] Enable conditional Armv8-M instructions Thomas Preudhomme
2017-12-01 14:50   ` [PATCH, GAS] Add new macro for Thumb-only opcodes Thomas Preudhomme
2017-12-18 13:37     ` Nick Clifton
2017-12-18 13:36   ` [PATCH, GAS] Enable conditional Armv8-M instructions Nick Clifton
2017-12-18 13:35 ` [PATCH, GAS] No IT usage deprecation for ARMv8-M Nick Clifton
2018-01-15 14:25   ` Thomas Preudhomme
2018-01-15 14:41     ` Thomas Preudhomme
2018-01-16 11:22     ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).