Initial back-edge CFI implementation (#3606)
Give the user the option to sign and to authenticate function return addresses with the operations introduced by the Pointer Authentication extension to the Arm instruction set architecture. Copyright (c) 2021, Arm Limited.
This commit is contained in:
30
cranelift/filetests/filetests/isa/aarch64/call-pauth.clif
Normal file
30
cranelift/filetests/filetests/isa/aarch64/call-pauth.clif
Normal file
@@ -0,0 +1,30 @@
|
||||
test compile precise-output
|
||||
set unwind_info=false
|
||||
target aarch64 sign_return_address
|
||||
|
||||
function %f1(i64) -> i64 {
|
||||
fn0 = %g(i64) -> i64
|
||||
|
||||
block0(v0: i64):
|
||||
v1 = call fn0(v0)
|
||||
return v1
|
||||
}
|
||||
|
||||
; paciasp
|
||||
; stp fp, lr, [sp, #-16]!
|
||||
; mov fp, sp
|
||||
; block0:
|
||||
; ldr x5, 8 ; b 12 ; data TestCase { length: 1, ascii: [103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] } + 0
|
||||
; blr x5
|
||||
; ldp fp, lr, [sp], #16
|
||||
; autiasp ; ret
|
||||
|
||||
function %f2(i64, i64) -> i64 {
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = iadd.i64 v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
; block0:
|
||||
; add x0, x0, x1
|
||||
; ret
|
||||
Reference in New Issue
Block a user