[compiler-rt] 0070c9e - [AArch64][compiler-rt] Fix PAC instructions for older compilers

Oliver Stannard via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 01:21:21 PST 2021


Author: Oliver Stannard
Date: 2021-03-11T09:21:05Z
New Revision: 0070c9ee2d2ce8513fa36375dca407d40150a576

URL: https://github.com/llvm/llvm-project/commit/0070c9ee2d2ce8513fa36375dca407d40150a576
DIFF: https://github.com/llvm/llvm-project/commit/0070c9ee2d2ce8513fa36375dca407d40150a576.diff

LOG: [AArch64][compiler-rt] Fix PAC instructions for older compilers

The paciasp and autiasp instructions are only accepted by recent
compilers, but have the same encoding as hint instructions, so we can
use the hint menmonic to support older compilers.

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_aarch64.inc.S

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_aarch64.inc.S b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_aarch64.inc.S
index 8a96e2d4aa95..72e482754b62 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_aarch64.inc.S
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_aarch64.inc.S
@@ -10,7 +10,7 @@ ASM_HIDDEN(COMMON_INTERCEPTOR_SPILL_AREA)
 ASM_TYPE_FUNCTION(ASM_WRAPPER_NAME(vfork))
 ASM_WRAPPER_NAME(vfork):
         // Save x30 in the off-stack spill area.
-        paciasp
+        hint    #25 // paciasp
         stp     xzr, x30, [sp, #-16]!
         bl      COMMON_INTERCEPTOR_SPILL_AREA
         ldp     xzr, x30, [sp], 16
@@ -35,7 +35,7 @@ ASM_WRAPPER_NAME(vfork):
         bl     COMMON_INTERCEPTOR_SPILL_AREA
         ldr    x30, [x0]
         ldp    x0, xzr, [sp], 16
-        autiasp
+        hint   #29 // autiasp
 
         ret
 ASM_SIZE(vfork)


        


More information about the llvm-commits mailing list