mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-10 06:03:52 +00:00
75d650872f
This mode is just like -mcmodel=small except that it moves the thread pointer from TPIDR_EL0 to TPIDR_EL1. Patch by Roland McGrath. Differential Revision: https://reviews.llvm.org/D31624 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299462 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
525 B
LLVM
16 lines
525 B
LLVM
; RUN: llc < %s -mtriple=aarch64-linux-gnu | FileCheck %s
|
|
; RUN: llc < %s -mtriple=aarch64-fuchsia | FileCheck %s
|
|
; RUN: llc < %s -mtriple=aarch64-fuchsia -code-model=kernel | FileCheck --check-prefix=FUCHSIA-KERNEL %s
|
|
|
|
; Function Attrs: nounwind readnone
|
|
declare i8* @llvm.thread.pointer() #1
|
|
|
|
define i8* @thread_pointer() {
|
|
; CHECK: thread_pointer:
|
|
; CHECK: mrs {{x[0-9]+}}, TPIDR_EL0
|
|
; FUCHSIA-KERNEL: thread_pointer:
|
|
; FUCHSIA-KERNEL: mrs {{x[0-9]+}}, TPIDR_EL1
|
|
%1 = tail call i8* @llvm.thread.pointer()
|
|
ret i8* %1
|
|
}
|