aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlexander Fedotov <alfedotov@gmail.com>2020-05-19 12:45:42 +0100
committerNick Clifton <nickc@redhat.com>2020-05-19 12:45:42 +0100
commit164446e04c89c7f5d8fd3efd7874a1af01035d72 (patch)
tree3937fb29107534cb3dc45f9699ab68528ad24b16 /gas
parenta501eb446f5149c1133dbc99f86743b8dd614fa4 (diff)
downloadgdb-164446e04c89c7f5d8fd3efd7874a1af01035d72.zip
gdb-164446e04c89c7f5d8fd3efd7874a1af01035d72.tar.gz
gdb-164446e04c89c7f5d8fd3efd7874a1af01035d72.tar.bz2
Fix the ARM assembler to generate a Realtime profile for armv8-r.
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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-arm.c16
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv8-r+crypto.d2
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv8-r+fp.d2
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv8-r+simd.d2
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv8-r.d2
6 files changed, 21 insertions, 10 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 05f5f23..67f6174 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 12ca245..bc0b3a4 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -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';
diff --git a/gas/testsuite/gas/arm/attr-march-armv8-r+crypto.d b/gas/testsuite/gas/arm/attr-march-armv8-r+crypto.d
index e2d83a0..5bd0fc5 100644
--- a/gas/testsuite/gas/arm/attr-march-armv8-r+crypto.d
+++ b/gas/testsuite/gas/arm/attr-march-armv8-r+crypto.d
@@ -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
diff --git a/gas/testsuite/gas/arm/attr-march-armv8-r+fp.d b/gas/testsuite/gas/arm/attr-march-armv8-r+fp.d
index e7a8446..afd5a75 100644
--- a/gas/testsuite/gas/arm/attr-march-armv8-r+fp.d
+++ b/gas/testsuite/gas/arm/attr-march-armv8-r+fp.d
@@ -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
diff --git a/gas/testsuite/gas/arm/attr-march-armv8-r+simd.d b/gas/testsuite/gas/arm/attr-march-armv8-r+simd.d
index e09091c..8c8578a 100644
--- a/gas/testsuite/gas/arm/attr-march-armv8-r+simd.d
+++ b/gas/testsuite/gas/arm/attr-march-armv8-r+simd.d
@@ -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
diff --git a/gas/testsuite/gas/arm/attr-march-armv8-r.d b/gas/testsuite/gas/arm/attr-march-armv8-r.d
index 820f32b..cf4b3a5 100644
--- a/gas/testsuite/gas/arm/attr-march-armv8-r.d
+++ b/gas/testsuite/gas/arm/attr-march-armv8-r.d
@@ -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