2016-07-19 21:35:11 +08:00
|
|
|
; RUN: llc < %s -mtriple=aarch64-linux-gnu | FileCheck %s
|
2017-04-05 03:51:53 +08:00
|
|
|
; RUN: llc < %s -mtriple=aarch64-fuchsia | FileCheck %s
|
|
|
|
; RUN: llc < %s -mtriple=aarch64-fuchsia -code-model=kernel | FileCheck --check-prefix=FUCHSIA-KERNEL %s
|
2015-07-28 21:03:31 +08:00
|
|
|
|
|
|
|
; Function Attrs: nounwind readnone
|
2016-04-20 04:51:05 +08:00
|
|
|
declare i8* @llvm.thread.pointer() #1
|
2015-07-28 21:03:31 +08:00
|
|
|
|
|
|
|
define i8* @thread_pointer() {
|
|
|
|
; CHECK: thread_pointer:
|
|
|
|
; CHECK: mrs {{x[0-9]+}}, TPIDR_EL0
|
2017-04-05 03:51:53 +08:00
|
|
|
; FUCHSIA-KERNEL: thread_pointer:
|
|
|
|
; FUCHSIA-KERNEL: mrs {{x[0-9]+}}, TPIDR_EL1
|
2016-04-20 04:51:05 +08:00
|
|
|
%1 = tail call i8* @llvm.thread.pointer()
|
2015-07-28 21:03:31 +08:00
|
|
|
ret i8* %1
|
|
|
|
}
|