Skip to content

Commit 0070c9e

Browse files
committed
[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.
1 parent 9f41c03 commit 0070c9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ASM_HIDDEN(COMMON_INTERCEPTOR_SPILL_AREA)
1010
ASM_TYPE_FUNCTION(ASM_WRAPPER_NAME(vfork))
1111
ASM_WRAPPER_NAME(vfork):
1212
// Save x30 in the off-stack spill area.
13-
paciasp
13+
hint #25 // paciasp
1414
stp xzr, x30, [sp, #-16]!
1515
bl COMMON_INTERCEPTOR_SPILL_AREA
1616
ldp xzr, x30, [sp], 16
@@ -35,7 +35,7 @@ ASM_WRAPPER_NAME(vfork):
3535
bl COMMON_INTERCEPTOR_SPILL_AREA
3636
ldr x30, [x0]
3737
ldp x0, xzr, [sp], 16
38-
autiasp
38+
hint #29 // autiasp
3939

4040
ret
4141
ASM_SIZE(vfork)

0 commit comments

Comments
 (0)