mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
Bionic has a defined thread-local location for the stack protector cookie. Emit a direct load instead of going through __stack_chk_guard. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265481 91177308-0d34-0410-b5e6-96231b3b80d8
20 lines
584 B
LLVM
20 lines
584 B
LLVM
; Test target-specific stack cookie location.
|
|
; RUN: llc -mtriple=aarch64-linux-android < %s -o - | FileCheck --check-prefix=ANDROID-AARCH64 %s
|
|
|
|
define void @_Z1fv() sspreq {
|
|
entry:
|
|
%x = alloca i32, align 4
|
|
%0 = bitcast i32* %x to i8*
|
|
call void @_Z7CapturePi(i32* nonnull %x)
|
|
ret void
|
|
}
|
|
|
|
declare void @_Z7CapturePi(i32*)
|
|
|
|
; ANDROID-AARCH64: mrs [[A:.*]], TPIDR_EL0
|
|
; ANDROID-AARCH64: ldr [[B:.*]], {{\[}}[[A]], #40]
|
|
; ANDROID-AARCH64: str [[B]], [sp,
|
|
; ANDROID-AARCH64: ldr [[C:.*]], {{\[}}[[A]], #40]
|
|
; ANDROID-AARCH64: ldr [[D:.*]], [sp,
|
|
; ANDROID-AARCH64: cmp [[C]], [[D]]
|