This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, GAS] No IT usage deprecation for ARMv8-M


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.

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]