[compiler-rt] [AArch64][SME] Rewrite __arm_get_current_vg to preserve required registers (PR #100143)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 08:47:40 PDT 2024


================
@@ -180,6 +184,48 @@ DEFINE_COMPILERRT_OUTLINE_FUNCTION_UNMANGLED(__arm_za_disable)
   ret
 END_COMPILERRT_OUTLINE_FUNCTION(__arm_za_disable)
 
+DEFINE_COMPILERRT_OUTLINE_FUNCTION_UNMANGLED(__arm_get_current_vg)
+  .variant_pcs __arm_get_current_vg
+  BTI_C
+  mov x0, xzr
----------------
sdesmalen-arm wrote:

Is this necessary? I'd expect it to be overwritten by the call to `__arm_sme_state`.

https://github.com/llvm/llvm-project/pull/100143


More information about the llvm-commits mailing list