Fix the ARM assembler to generate a Realtime profile for armv8-r.
authorAlexander Fedotov <alfedotov@gmail.com>
Tue, 19 May 2020 11:45:42 +0000 (12:45 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 19 May 2020 11:45:42 +0000 (12:45 +0100)
PR 25992
gas * config/tc-arm.c : Add arm_ext_v8r feature.
(it_fsm_post_encode): Check arm_ext_v8r feature.
(get_aeabi_cpu_arch_from_fset): Check arm_ext_v8r feature.

include * opcode/arm.h (ARM_EXT2_V8R): Define. Modified ARM_AEXT2_V8R.

gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/gas/arm/attr-march-armv8-r+crypto.d
gas/testsuite/gas/arm/attr-march-armv8-r+fp.d
gas/testsuite/gas/arm/attr-march-armv8-r+simd.d
gas/testsuite/gas/arm/attr-march-armv8-r.d
include/ChangeLog
include/opcode/arm.h

index 05f5f2385ccf5155f2e26dfef04d5cdc4c6e486e..67f6174c27edbcfab95e4be8707b6ae5ebcc5749 100644 (file)
@@ -1,3 +1,10 @@
+2020-05-19  Alexander Fedotov  <alfedotov@gmail.com>
+
+       PR 25992
+       * config/tc-arm.c : Add arm_ext_v8r feature.
+       (it_fsm_post_encode): Check arm_ext_v8r feature.
+       (get_aeabi_cpu_arch_from_fset): Check arm_ext_v8r feature.
+
 2020-05-19  Alan Modra  <amodra@gmail.com>
 
        * write.c (write_contents): Use bfd_get_filename rather than
index 12ca245cbc7e616a6a5be635a9c026014ebf0d34..bc0b3a4f6f58bd2f9c72b0054969fbf23fcc8c48 100644 (file)
@@ -230,6 +230,7 @@ static const arm_feature_set arm_ext_div = ARM_FEATURE_CORE_LOW (ARM_EXT_DIV);
 static const arm_feature_set arm_ext_v7 = ARM_FEATURE_CORE_LOW (ARM_EXT_V7);
 static const arm_feature_set arm_ext_v7a = ARM_FEATURE_CORE_LOW (ARM_EXT_V7A);
 static const arm_feature_set arm_ext_v7r = ARM_FEATURE_CORE_LOW (ARM_EXT_V7R);
+static const arm_feature_set arm_ext_v8r = ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8R);
 #ifdef OBJ_ELF
 static const arm_feature_set ATTRIBUTE_UNUSED arm_ext_v7m = ARM_FEATURE_CORE_LOW (ARM_EXT_V7M);
 #endif
@@ -23298,7 +23299,8 @@ it_fsm_post_encode (void)
       && warn_on_restrict_it
       && !now_pred.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_v8r))
       && !ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_m))
     {
       if (inst.instruction >= 0x10000)
@@ -32878,12 +32880,14 @@ get_aeabi_cpu_arch_from_fset (const arm_feature_set *arch_ext_fset,
 
  found:
   /* Tag_CPU_arch_profile.  */
-  if (ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_v7a)
-      || ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_v8)
-      || (ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_atomics)
-         && !ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_v8m_m_only)))
+  if (!ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_v8r)
+      && (ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_v7a)
+          || ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_v8)
+          || (ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_atomics)
+              && !ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_v8m_m_only))))
     *profile = 'A';
-  else if (ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_v7r))
+  else if (ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_v7r)
+      || ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_v8r))
     *profile = 'R';
   else if (ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_m))
     *profile = 'M';
index e2d83a0dbe9ec11a125a90c8f93d0f3e81fefd61..5bd0fc5f3714349b68e60cc8289dcbb0898b9574 100644 (file)
@@ -9,7 +9,7 @@ Attribute Section: aeabi
 File Attributes
   Tag_CPU_name: "8-R"
   Tag_CPU_arch: v8-R
-  Tag_CPU_arch_profile: Application
+  Tag_CPU_arch_profile: Realtime
   Tag_ARM_ISA_use: Yes
   Tag_THUMB_ISA_use: Thumb-2
   Tag_FP_arch: FP for ARMv8
index e7a8446f9d2410d25d0f2d274f8b4a6cc8c8355b..afd5a756d028e529942bde68c81e8ab1387817b9 100644 (file)
@@ -9,7 +9,7 @@ Attribute Section: aeabi
 File Attributes
   Tag_CPU_name: "8-R"
   Tag_CPU_arch: v8-R
-  Tag_CPU_arch_profile: Application
+  Tag_CPU_arch_profile: Realtime
   Tag_ARM_ISA_use: Yes
   Tag_THUMB_ISA_use: Thumb-2
   Tag_FP_arch: FP for ARMv8
index e09091cb220676c83a07b980b29474f411a686cf..8c8578a78f16fd9308ad71b327d26f03c914500a 100644 (file)
@@ -9,7 +9,7 @@ Attribute Section: aeabi
 File Attributes
   Tag_CPU_name: "8-R"
   Tag_CPU_arch: v8-R
-  Tag_CPU_arch_profile: Application
+  Tag_CPU_arch_profile: Realtime
   Tag_ARM_ISA_use: Yes
   Tag_THUMB_ISA_use: Thumb-2
   Tag_FP_arch: FP for ARMv8
index 820f32beeaf2ba576655467f452285fbd4fb21c2..cf4b3a51f808048746bf3ab2f701f66a0f5113e0 100644 (file)
@@ -9,7 +9,7 @@ Attribute Section: aeabi
 File Attributes
   Tag_CPU_name: "8-R"
   Tag_CPU_arch: v8-R
-  Tag_CPU_arch_profile: Application
+  Tag_CPU_arch_profile: Realtime
   Tag_ARM_ISA_use: Yes
   Tag_THUMB_ISA_use: Thumb-2
   Tag_MPextension_use: Allowed
index c14cea3bfe1f3ca7c298113116d32402a5cceb26..9f2599f81c4fc8e49abba5ae48d0b00eaf0540c1 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-19  Alexander Fedotov  <alfedotov@gmail.com>
+
+       PR 25992
+       * opcode/arm.h (ARM_EXT2_V8R): Define. Modified ARM_AEXT2_V8R.
+
 2020-05-11  Alan Modra  <amodra@gmail.com>
 
        * opcode/ppc.h (PPC_OPERAND_ACC): Define.  Renumber following
index 979bd20885812504869d39ce374db38fbce429ba..834edf0a24440044950d7ed9397b9f0aa02540cf 100644 (file)
@@ -88,6 +88,7 @@
 #define ARM_EXT2_CDE5       0x10000000 /* Using CDE coproc 5.     */
 #define ARM_EXT2_CDE6       0x20000000 /* Using CDE coproc 6.     */
 #define ARM_EXT2_CDE7       0x40000000 /* Using CDE coproc 7.     */
+#define ARM_EXT2_V8R        0x80000000 /* Arm V8R.                    */
 
 /* Co-processor space extensions.  */
 #define ARM_CEXT_XSCALE             0x00000001 /* Allow MIA etc.                  */
 #define ARM_AEXT2_V8M_MAIN     (ARM_AEXT2_V8M_BASE | ARM_EXT2_V8M_MAIN)
 #define ARM_AEXT2_V8M_MAIN_DSP  ARM_AEXT2_V8M_MAIN
 #define ARM_AEXT_V8R            ARM_AEXT_V8A
-#define ARM_AEXT2_V8R           ARM_AEXT2_V8AR
+#define ARM_AEXT2_V8R           (ARM_EXT2_V8R | ARM_AEXT2_V8AR)
 #define ARM_AEXT_V8_1M_MAIN     ARM_AEXT_V8M_MAIN
 #define ARM_AEXT2_V8_1M_MAIN   (ARM_AEXT2_V8M_MAIN | ARM_EXT2_V8_1M_MAIN     \
                                                    | ARM_EXT2_FP16_INST)