mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 12:19:53 +00:00
45c07d1520
This will be used to implement __builtin_thread_pointer in clang. Differential Revision: http://reviews.llvm.org/D19569 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267743 91177308-0d34-0410-b5e6-96231b3b80d8
13 lines
348 B
LLVM
13 lines
348 B
LLVM
; RUN: llc -march=mips < %s | FileCheck %s
|
|
; RUN: llc -march=mips64 < %s | FileCheck %s
|
|
; RUN: llc -march=mipsel < %s | FileCheck %s
|
|
; RUN: llc -march=mips64el < %s | FileCheck %s
|
|
|
|
declare i8* @llvm.thread.pointer() nounwind readnone
|
|
|
|
define i8* @thread_pointer() {
|
|
; CHECK: rdhwr $3, $29
|
|
%1 = tail call i8* @llvm.thread.pointer()
|
|
ret i8* %1
|
|
}
|