This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[AArch64] Fix ARMv8.1 and ARMv8.2 feature settings.
- From: Matthew Wahab <matthew dot wahab at foss dot arm dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 8 Dec 2015 15:59:20 +0000
- Subject: [AArch64] Fix ARMv8.1 and ARMv8.2 feature settings.
- Authentication-results: sourceware.org; auth=none
Hello,
The ARMv8.1 architecture includes CRC as a required extension but this
isn't reflected in the features enabled by -march=armv8.1-a. The FP16
feature modifier also clashes with AARCH64_FEATURE_V8_1 and the list of
features for ARMv8.2 is missing ARMv8.1 features.
This patch enables +crc for -march values of armv8.1-a and later. It
also fixes the values for AARCH64_FEATURE_F16 and makes
AARCH64_ARCH_V8_2 a superset of AARCH64_ARCH_V8_2.
Tested aarch64-none-linux-gnu with cross-compiled check-binutils and
check-gas.
Ok for trunk?
Matthew
gas/
2015-12-07 Matthew Wahab <matthew.wahab@arm.com>
* doc/c-aarch64.texi (AArch64 Extensions): Update entry for crc.
include/opcode
2015-12-07 Matthew Wahab <matthew.wahab@arm.com>
* aarch64.h (AARCH64_FEATURE_F16): Fix clash with
AARCH64_FEATURE_V8_1.
(AARCH64_ARCH_V8_1): Add AARCH64_FEATURE_CRC.
(AARCH64_ARCH_V8_2): Add AARCH64_FEATURE_CRC and
AARCH64_FEATURE_V8_1.
>From 7bacd028880301456064298a788a975c2c537eba Mon Sep 17 00:00:00 2001
From: Matthew Wahab <matthew.wahab@arm.com>
Date: Mon, 7 Dec 2015 11:01:32 +0000
Subject: [PATCH] [AArch64] Fix CRC and FP16 feature settings.
Change-Id: Ie8f7515d9d59dc508518adee9493c6220caae053
---
gas/doc/c-aarch64.texi | 2 +-
include/opcode/aarch64.h | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi
index 2717af2..363366a 100644
--- a/gas/doc/c-aarch64.texi
+++ b/gas/doc/c-aarch64.texi
@@ -128,7 +128,7 @@ automatically cause those extensions to be disabled.
@multitable @columnfractions .12 .17 .17 .54
@headitem Extension @tab Minimum Architecture @tab Enabled by default
@tab Description
-@item @code{crc} @tab ARMv8-A @tab No
+@item @code{crc} @tab ARMv8-A @tab ARMv8.1-A or later
@tab Enable CRC instructions.
@item @code{crypto} @tab ARMv8-A @tab No
@tab Enable cryptographic extensions. This implies @code{fp} and @code{simd}.
diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
index f1658bc..6654be3 100644
--- a/include/opcode/aarch64.h
+++ b/include/opcode/aarch64.h
@@ -48,7 +48,7 @@ typedef uint32_t aarch64_insn;
#define AARCH64_FEATURE_LOR 0x00400000 /* LOR instructions. */
#define AARCH64_FEATURE_RDMA 0x00800000 /* v8.1 SIMD instructions. */
#define AARCH64_FEATURE_V8_1 0x01000000 /* v8.1 features. */
-#define AARCH64_FEATURE_F16 0x01000000 /* v8.2 FP16 instructions. */
+#define AARCH64_FEATURE_F16 0x02000000 /* v8.2 FP16 instructions. */
/* Architectures are the sum of the base and extensions. */
#define AARCH64_ARCH_V8 AARCH64_FEATURE (AARCH64_FEATURE_V8, \
@@ -57,6 +57,7 @@ typedef uint32_t aarch64_insn;
#define AARCH64_ARCH_V8_1 AARCH64_FEATURE (AARCH64_FEATURE_V8, \
AARCH64_FEATURE_FP \
| AARCH64_FEATURE_SIMD \
+ | AARCH64_FEATURE_CRC \
| AARCH64_FEATURE_V8_1 \
| AARCH64_FEATURE_LSE \
| AARCH64_FEATURE_PAN \
@@ -66,7 +67,9 @@ typedef uint32_t aarch64_insn;
AARCH64_FEATURE_V8_2 \
| AARCH64_FEATURE_F16 \
| AARCH64_FEATURE_FP \
- | AARCH64_FEATURE_SIMD \
+ | AARCH64_FEATURE_SIMD \
+ | AARCH64_FEATURE_CRC \
+ | AARCH64_FEATURE_V8_1 \
| AARCH64_FEATURE_LSE \
| AARCH64_FEATURE_PAN \
| AARCH64_FEATURE_LOR \
--
2.1.4