[ARM] Add Tag_CPU_arch missing value descriptions in attribute parser

The ARM attribute parser for Tag_CPU_arch is missing value descriptions
for Armv8-A and Armv8-R.

This patch adds these descriptions.

Reviewed By: pratlucas

Differential Revision: https://reviews.llvm.org/D129631
This commit is contained in:
Victor Campos 2022-07-12 16:13:12 +01:00
parent e80dbfddc5
commit b43bec19b9
3 changed files with 23 additions and 1 deletions

View File

@ -85,7 +85,7 @@ Error ARMAttributeParser::CPU_arch(AttrType tag) {
static const char *strings[] = {
"Pre-v4", "ARM v4", "ARM v4T", "ARM v5T", "ARM v5TE", "ARM v5TEJ", "ARM v6",
"ARM v6KZ", "ARM v6T2", "ARM v6K", "ARM v7", "ARM v6-M", "ARM v6S-M",
"ARM v7E-M", "ARM v8", nullptr,
"ARM v7E-M", "ARM v8-A", "ARM v8-R",
"ARM v8-M Baseline", "ARM v8-M Mainline", nullptr, nullptr, nullptr,
"ARM v8.1-M Mainline", "ARM v9-A"
};

View File

@ -0,0 +1,11 @@
@ RUN: llvm-mc -triple arm -filetype asm -o - %s | FileCheck %s
@ RUN: llvm-mc -triple arm -filetype obj -o - %s | llvm-readobj -A - | \
@ RUN: FileCheck %s --check-prefix=CHECK-OBJ
.eabi_attribute Tag_CPU_arch, 14
@ CHECK: .eabi_attribute 6, 14 @ Tag_CPU_arch
@ CHECK-OBJ: Attribute
@ CHECK-OBJ: Tag: 6
@ CHECK-OBJ-NEXT: Value: 14
@ CHECK-OBJ-NEXT: TagName: CPU_arch
@ CHECK-OBJ-NEXT: Description: ARM v8-A

View File

@ -0,0 +1,11 @@
@ RUN: llvm-mc -triple arm -filetype asm -o - %s | FileCheck %s
@ RUN: llvm-mc -triple arm -filetype obj -o - %s | llvm-readobj -A - | \
@ RUN: FileCheck %s --check-prefix=CHECK-OBJ
.eabi_attribute Tag_CPU_arch, 15
@ CHECK: .eabi_attribute 6, 15 @ Tag_CPU_arch
@ CHECK-OBJ: Attribute
@ CHECK-OBJ: Tag: 6
@ CHECK-OBJ-NEXT: Value: 15
@ CHECK-OBJ-NEXT: TagName: CPU_arch
@ CHECK-OBJ-NEXT: Description: ARM v8-R