mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-30 00:16:48 +00:00
This path add the aarch64 lowering of __builtin_thread_pointer. It uses the already implemented AArch64ISD::THREAD_POINTER used in TLS generation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243412 91177308-0d34-0410-b5e6-96231b3b80d8
12 lines
316 B
LLVM
12 lines
316 B
LLVM
; RUN: llc < %s -march=aarch64 -mtriple=aarch64-linux-gnu | FileCheck %s
|
|
|
|
; Function Attrs: nounwind readnone
|
|
declare i8* @llvm.aarch64.thread.pointer() #1
|
|
|
|
define i8* @thread_pointer() {
|
|
; CHECK: thread_pointer:
|
|
; CHECK: mrs {{x[0-9]+}}, TPIDR_EL0
|
|
%1 = tail call i8* @llvm.aarch64.thread.pointer()
|
|
ret i8* %1
|
|
}
|