From f344c028dea34c1f1ec3b901d7a4c4d5d867384d Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Mon, 18 Jan 2021 17:23:47 +0000 Subject: [PATCH] [AArch64] Add missing "pauth" feature to the .arch_extension directive. Differential Revision: https://reviews.llvm.org/D94970 --- llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp | 1 + llvm/test/MC/AArch64/armv8.3a-pauth.s | 6 ++++++ llvm/test/MC/AArch64/directive-arch_extension.s | 4 ++++ 3 files changed, 11 insertions(+) create mode 100644 llvm/test/MC/AArch64/armv8.3a-pauth.s diff --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp index 0916cf9..bcc5630 100644 --- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp +++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp @@ -2915,6 +2915,7 @@ static const struct Extension { {"sve2-bitperm", {AArch64::FeatureSVE2BitPerm}}, {"ls64", {AArch64::FeatureLS64}}, {"xs", {AArch64::FeatureXS}}, + {"pauth", {AArch64::FeaturePAuth}}, // FIXME: Unsupported extensions {"pan", {}}, {"lor", {}}, diff --git a/llvm/test/MC/AArch64/armv8.3a-pauth.s b/llvm/test/MC/AArch64/armv8.3a-pauth.s new file mode 100644 index 0000000..153bf68 --- /dev/null +++ b/llvm/test/MC/AArch64/armv8.3a-pauth.s @@ -0,0 +1,6 @@ +// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+pauth < %s | FileCheck %s + +paciasp + +// CHECK: .text +// CHECK: paciasp // encoding: [0x3f,0x23,0x03,0xd5] diff --git a/llvm/test/MC/AArch64/directive-arch_extension.s b/llvm/test/MC/AArch64/directive-arch_extension.s index a44b14d..7041f61 100644 --- a/llvm/test/MC/AArch64/directive-arch_extension.s +++ b/llvm/test/MC/AArch64/directive-arch_extension.s @@ -71,3 +71,7 @@ ldapr x0, [x1] .arch_extension ls64 ld64b x0, [x13] // CHECK: ld64b x0, [x13] + +.arch_extension pauth +paciasp +// CHECK: paciasp -- 2.7.4