mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
6a6f9554e3
Summary: The GR740 provides an up cycle counter in the registers ASR22 and ASR23. As these registers can not be read together atomically we only use the value of ASR23 for llvm.readcyclecounter(). The ASR23 register holds the 32 LSBs of the up-counter. Reviewers: jyknight, venkatra Reviewed By: jyknight Subscribers: jfb, fedor.sergeev, jrtc27, llvm-commits Differential Revision: https://reviews.llvm.org/D48638 llvm-svn: 340733
12 lines
247 B
LLVM
12 lines
247 B
LLVM
; RUN: llc < %s -march=sparc -mcpu=gr740 -verify-machineinstrs | FileCheck %s
|
|
; CHECK: rd %asr23, %o1
|
|
; CHECK: mov %g0, %o0
|
|
|
|
define i64 @test() {
|
|
entry:
|
|
%0 = call i64 @llvm.readcyclecounter()
|
|
ret i64 %0
|
|
}
|
|
|
|
declare i64 @llvm.readcyclecounter()
|