mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-07 19:47:53 +00:00
a390364af8
We can't outline BTI instructions, because they need to be the very first instruction executed after an indirect call or branch. If we outline them, then an indirect call might go to the branch to the outlined function, which will fault. Differential revision: https://reviews.llvm.org/D57753 llvm-svn: 353190
23 lines
584 B
LLVM
23 lines
584 B
LLVM
; RUN: llc -mtriple aarch64--none-eabi < %s | FileCheck %s
|
|
|
|
; The BTI instruction cannot be outlined, because it needs to be the very first
|
|
; instruction executed after an indirect call.
|
|
|
|
@g = hidden global i32 0, align 4
|
|
|
|
define hidden void @foo() minsize "branch-target-enforcement" {
|
|
entry:
|
|
; CHECK: hint #34
|
|
; CHECK: b OUTLINED_FUNCTION_0
|
|
store volatile i32 1, i32* @g, align 4
|
|
ret void
|
|
}
|
|
|
|
define hidden void @bar() minsize "branch-target-enforcement" {
|
|
entry:
|
|
; CHECK: hint #34
|
|
; CHECK: b OUTLINED_FUNCTION_0
|
|
store volatile i32 1, i32* @g, align 4
|
|
ret void
|
|
}
|