aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/AsmParser/LLLexer.cpp
diff options
context:
space:
mode:
authorSander de Smalen <sander.desmalen@arm.com>2022-09-14 15:53:13 +0000
committerSander de Smalen <sander.desmalen@arm.com>2022-09-15 15:14:13 +0000
commit45d28779c5dc6c8afa6feb24d68606f01b9800f4 (patch)
treeea5fcee24539871a03e415c17a2904cede77a162 /llvm/lib/AsmParser/LLLexer.cpp
parentb0eea8f440af48dfe52ada04a58198460694fb56 (diff)
downloadllvm-45d28779c5dc6c8afa6feb24d68606f01b9800f4.zip
llvm-45d28779c5dc6c8afa6feb24d68606f01b9800f4.tar.gz
llvm-45d28779c5dc6c8afa6feb24d68606f01b9800f4.tar.bz2
[AArch64][SME] Fix lowering of llvm.aarch64.get.pstatesm()
A thread may not have access to SME or TPIDR2_EL0, so in order to safely query PSTATE.SM in a streaming-compatible function, the code should call `__arm_sme_state()`, as described in the ABI: https://github.com/ARM-software/abi-aa/pull/123/commits/c2bb09c4d4ee60a5787baf1ccc7e92e67e4240b7 This means that the value of pstate.sm is: * 0 if the function is non-streaming. * 1 if the function has `arm_streaming` or `arm_locally_streaming`. * evaluated at runtime by a call to __arm_sme_state() otherwise. This patch also adds a calling convention for calls to SME support routines. At some point we can remove the need for the llvm.aarch64.get.pstatesm() intrinsic and use function calls (with the corresponding cc) directly instead. Reviewed By: aemerson Differential Revision: https://reviews.llvm.org/D131571
Diffstat (limited to 'llvm/lib/AsmParser/LLLexer.cpp')
-rw-r--r--llvm/lib/AsmParser/LLLexer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp
index c9a98269..c020fe7 100644
--- a/llvm/lib/AsmParser/LLLexer.cpp
+++ b/llvm/lib/AsmParser/LLLexer.cpp
@@ -597,6 +597,8 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(arm_aapcs_vfpcc);
KEYWORD(aarch64_vector_pcs);
KEYWORD(aarch64_sve_vector_pcs);
+ KEYWORD(aarch64_sme_preservemost_from_x0);
+ KEYWORD(aarch64_sme_preservemost_from_x2);
KEYWORD(msp430_intrcc);
KEYWORD(avr_intrcc);
KEYWORD(avr_signalcc);