+2020-09-08 Alex Coplan <alex.coplan@arm.com>
+
+ * archures.c (bfd_mach_aarch64_8R): New.
+ * bfd-in2.h: Regenerate.
+ * cpu-aarch64.c (bfd_aarch64_arch_v8_r): New.
+ (bfd_aarch64_arch_ilp32): Update tail pointer.
+
2020-09-08 Alan Modra <amodra@gmail.com>
PR 13250
.#define bfd_mach_tilegx32 2
. bfd_arch_aarch64, {* AArch64. *}
.#define bfd_mach_aarch64 0
+.#define bfd_mach_aarch64_8R 1
.#define bfd_mach_aarch64_ilp32 32
. bfd_arch_nios2, {* Nios II. *}
.#define bfd_mach_nios2 0
#define bfd_mach_tilegx32 2
bfd_arch_aarch64, /* AArch64. */
#define bfd_mach_aarch64 0
+#define bfd_mach_aarch64_8R 1
#define bfd_mach_aarch64_ilp32 32
bfd_arch_nios2, /* Nios II. */
#define bfd_mach_nios2 0
"aarch64", PRINT, 4, DEFAULT, compatible, scan, \
bfd_arch_default_fill, NEXT, 0 }
+static const bfd_arch_info_type bfd_aarch64_arch_v8_r =
+ N (bfd_mach_aarch64_8R, "aarch64:armv8-r", 64, FALSE, NULL);
+
static const bfd_arch_info_type bfd_aarch64_arch_ilp32 =
- N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", 32, FALSE, NULL);
+ N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", 32, FALSE,
+ &bfd_aarch64_arch_v8_r);
const bfd_arch_info_type bfd_aarch64_arch =
N (0, "aarch64", 64, TRUE, &bfd_aarch64_arch_ilp32);
+2020-09-08 Alex Coplan <alex.coplan@arm.com>
+
+ * config/tc-aarch64.c (aarch64_archs): Add armv8-r.
+ * doc/c-aarch64.texi: Document -march=armv8-r.
+
2020-09-07 Mark Wielaard <mark@klomp.org>
* dwarf2dbg.c (add_line_strp): New function.
{"armv8.4-a", AARCH64_ARCH_V8_4},
{"armv8.5-a", AARCH64_ARCH_V8_5},
{"armv8.6-a", AARCH64_ARCH_V8_6},
+ {"armv8-r", AARCH64_ARCH_V8_R},
{NULL, AARCH64_ARCH_NONE}
};
instruction which will not execute on the target architecture. The
following architecture names are recognized: @code{armv8-a},
@code{armv8.1-a}, @code{armv8.2-a}, @code{armv8.3-a}, @code{armv8.4-a}
-@code{armv8.5-a}, and @code{armv8.6-a}.
+@code{armv8.5-a}, @code{armv8.6-a}, and @code{armv8-r}.
If both @option{-mcpu} and @option{-march} are specified, the
assembler will use the setting for @option{-mcpu}. If neither are
+2020-09-08 Alex Coplan <alex.coplan@arm.com>
+
+ * opcode/aarch64.h (AARCH64_FEATURE_V8_A): New.
+ (AARCH64_FEATURE_V8_R): New.
+ (AARCH64_ARCH_V8): Include new A-profile feature bit.
+ (AARCH64_ARCH_V8_R): New.
+
2020-09-02 Alan Modra <amodra@gmail.com>
* opcode/v850.h (struct v850_operand <insert>): Make param op an
#define AARCH64_FEATURE_V8 (1ULL << 0) /* All processors. */
#define AARCH64_FEATURE_V8_6 (1ULL << 1) /* ARMv8.6 processors. */
#define AARCH64_FEATURE_BFLOAT16 (1ULL << 2) /* Bfloat16 insns. */
+#define AARCH64_FEATURE_V8_A (1ULL << 3) /* Armv8-A processors. */
#define AARCH64_FEATURE_SVE2 (1ULL << 4) /* SVE2 instructions. */
#define AARCH64_FEATURE_V8_2 (1ULL << 5) /* ARMv8.2 processors. */
#define AARCH64_FEATURE_V8_3 (1ULL << 6) /* ARMv8.3 processors. */
#define AARCH64_FEATURE_SVE2_SM4 (1ULL << 9)
#define AARCH64_FEATURE_SVE2_SHA3 (1ULL << 10)
#define AARCH64_FEATURE_V8_4 (1ULL << 11) /* ARMv8.4 processors. */
+#define AARCH64_FEATURE_V8_R (1ULL << 12) /* Armv8-R processors. */
#define AARCH64_FEATURE_FP (1ULL << 17) /* FP instructions. */
#define AARCH64_FEATURE_SIMD (1ULL << 18) /* SIMD instructions. */
#define AARCH64_FEATURE_CRC (1ULL << 19) /* CRC instructions. */
/* Architectures are the sum of the base and extensions. */
#define AARCH64_ARCH_V8 AARCH64_FEATURE (AARCH64_FEATURE_V8, \
- AARCH64_FEATURE_FP \
+ AARCH64_FEATURE_V8_A \
+ | AARCH64_FEATURE_FP \
| AARCH64_FEATURE_SIMD)
#define AARCH64_ARCH_V8_1 AARCH64_FEATURE (AARCH64_ARCH_V8, \
AARCH64_FEATURE_CRC \
AARCH64_FEATURE_V8_6 \
| AARCH64_FEATURE_BFLOAT16 \
| AARCH64_FEATURE_I8MM)
+#define AARCH64_ARCH_V8_R (AARCH64_FEATURE (AARCH64_ARCH_V8_4, \
+ AARCH64_FEATURE_V8_R) \
+ & ~(AARCH64_FEATURE_V8_A | AARCH64_FEATURE_LOR))
#define AARCH64_ARCH_NONE AARCH64_FEATURE (0, 0)
#define AARCH64_ANY AARCH64_FEATURE (-1, 0) /* Any basic core. */
+2020-09-08 Alex Coplan <alex.coplan@arm.com>
+
+ * aarch64-dis.c (arch_variant): New.
+ (determine_disassembling_preference): Disassemble according to
+ arch variant.
+ (select_aarch64_variant): New.
+ (print_insn_aarch64): Set feature set.
+
2020-09-02 Alan Modra <amodra@gmail.com>
* v850-opc.c (insert_i5div1, insert_i5div2, insert_i5div3),
MAP_DATA
};
+static aarch64_feature_set arch_variant; /* See select_aarch64_variant. */
static enum map_type last_type;
static int last_mapping_sym = -1;
static bfd_vma last_stop_offset = 0;
DEBUG_TRACE ("skip %s as base opcode not match", alias->name);
continue;
}
+
+ if (!AARCH64_CPU_HAS_FEATURE (arch_variant, *alias->avariant))
+ {
+ DEBUG_TRACE ("skip %s: we're missing features", alias->name);
+ continue;
+ }
+
/* No need to do any complicated transformation on operands, if the alias
opcode does not have any operand. */
if (aarch64_num_of_operands (alias) == 0 && alias->opcode == inst->value)
return FALSE;
}
+/* Set the feature bits in arch_variant in order to get the correct disassembly
+ for the chosen architecture variant.
+
+ Currently we only restrict disassembly for Armv8-R and otherwise enable all
+ non-R-profile features. */
+static void
+select_aarch64_variant (unsigned mach)
+{
+ switch (mach)
+ {
+ case bfd_mach_aarch64_8R:
+ arch_variant = AARCH64_ARCH_V8_R;
+ break;
+ default:
+ arch_variant = AARCH64_ANY & ~(AARCH64_FEATURE_V8_R);
+ }
+}
+
/* Entry-point of the AArch64 disassembler. */
int
unsigned int size = 4;
unsigned long data;
aarch64_operand_error errors;
+ static bfd_boolean set_features;
if (info->disassembler_options)
{
info->disassembler_options = NULL;
}
+ if (!set_features)
+ {
+ select_aarch64_variant (info->mach);
+ set_features = TRUE;
+ }
+
/* Aarch64 instructions are always little-endian */
info->endian_code = BFD_ENDIAN_LITTLE;