60 lines · plain
1;; This file contains the previous semantic of the branch-target-enforcement, sign-return-address.2;; Used for test mixing a mixed link case and also verify the import too in llc.3 4; RUN: llc -mattr=+pauth -mattr=+bti %s -o - | FileCheck %s5 6target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"7target triple = "aarch64-unknown-linux-gnu"8 9define i32 @old_bti() #0 {10entry:11 ret i32 212}13 14; CHECK-LABEL: old_bti:15; CHECK: bti c16; CHECK: mov17; CHECK: ret18 19define i32 @old_pac() #1 {20entry:21 ret i32 222}23 24; CHECK-LABEL: old_pac:25; CHECK: paciasp26; CHECK: mov27; CHECK: retaa28 29 30define i32 @old_none() #2 {31entry:32 ret i32 333}34 35; CHECK-LABEL: old_none:36; CHECK-NOT: hint37; CHECK-NOT: paci38; CHECK-NOT: bti39; CHECK: ret40 41declare i32 @func(i32)42 43define i32 @old_none_leaf() #3 {44entry:45 %0 = call i32 @func()46 ret i32 %047}48 49; CHECK-LABEL: old_none_leaf:50; CHECK: paciasp51; CHECK: bl func52; CHECK: retaa53 54attributes #0 = { noinline nounwind optnone "branch-target-enforcement"="true" }55attributes #1 = { noinline nounwind optnone "branch-target-enforcement"="false" "sign-return-address"="all" "sign-return-address-key"="a_key" }56attributes #2 = { noinline nounwind optnone "branch-target-enforcement"="false" "sign-return-address"="none" }57attributes #3 = { noinline nounwind optnone "branch-target-enforcement"="false" "sign-return-address"="non-leaf" "sign-return-address-key"="a_key" }58 59;; Intentionally no module flags60