aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Fedotov <alfedotov@gmail.com>2020-05-20 11:46:54 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2020-07-31 03:22:36 +0300
commit22b2fe8fd62f1f63eafc0791918c4a0914c647a8 (patch)
treea266c9e29e2fe681e880f1bd60b81ee2bf96c0ee
parentRe: Fix tight loop on recursively-defined symbols (diff)
downloadbinutils-gdb-22b2fe8fd62f1f63eafc0791918c4a0914c647a8.tar.gz
binutils-gdb-22b2fe8fd62f1f63eafc0791918c4a0914c647a8.tar.bz2
binutils-gdb-22b2fe8fd62f1f63eafc0791918c4a0914c647a8.zip
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. (cherry picked from commit ef2826c0fdbbd9016630f0738e3e2dd5eb14012a)
-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
-rw-r--r--include/ChangeLog5
-rw-r--r--include/opcode/arm.h9
8 files changed, 31 insertions, 14 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0ee9056472..13ff6add65 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2020-05-18 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-18 Alan Modra <amodra@gmail.com>
* symbols.c (resolve_symbol_value): Invoke LOCAL_SYMBOL_CHECK
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 7550f9096c..b6bb0debbe 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
@@ -22800,7 +22801,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)
@@ -32335,12 +32337,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 e2d83a0dbe..5bd0fc5f37 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 e7a8446f9d..afd5a756d0 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 e09091cb22..8c8578a78f 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 820f32beea..cf4b3a51f8 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
diff --git a/include/ChangeLog b/include/ChangeLog
index 2cf472a5df..7cdf7ec41c 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-20 Alexander Fedotov <alfedotov@gmail.com>
+
+ PR 25992
+ * opcode/arm.h (ARM_EXT2_V8R): Define. Modified ARM_AEXT2_V8R.
+
2020-04-01 Martin Liska <mliska@suse.cz>
Maciej W. Rozycki <macro@linux-mips.org>
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
index 6d8c3d0086..ca46985d61 100644
--- a/include/opcode/arm.h
+++ b/include/opcode/arm.h
@@ -76,9 +76,10 @@
#define ARM_EXT2_V8_6A 0x00010000 /* ARM V8.6A. */
#define ARM_EXT2_BF16 0x00020000 /* ARMv8 bfloat16. */
#define ARM_EXT2_I8MM 0x00040000 /* ARMv8.6A i8mm. */
-#define ARM_EXT2_CRC 0x00080000 /* ARMv8 CRC32 */
-#define ARM_EXT2_MVE 0x00100000 /* MVE Integer extension. */
-#define ARM_EXT2_MVE_FP 0x00200000 /* MVE Floating Point extension. */
+#define ARM_EXT2_CRC 0x00080000 /* ARMv8 CRC32. */
+#define ARM_EXT2_MVE 0x00100000 /* MVE Integer extension. */
+#define ARM_EXT2_MVE_FP 0x00200000 /* MVE Floating Point extension. */
+#define ARM_EXT2_V8R 0x80000000 /* ARM V8-R. */
/* Co-processor space extensions. */
#define ARM_CEXT_XSCALE 0x00000001 /* Allow MIA etc. */
@@ -182,7 +183,7 @@
#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)