2011-03-15 21:45:47 +08:00
|
|
|
; RUN: llc < %s -march=xcore | FileCheck %s
|
|
|
|
declare i32 @llvm.xcore.getps(i32)
|
|
|
|
declare void @llvm.xcore.setps(i32, i32)
|
|
|
|
|
|
|
|
define i32 @getps(i32 %reg) nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: getps:
|
2011-03-15 21:45:47 +08:00
|
|
|
; CHECK: get r0, ps[r0]
|
|
|
|
%result = call i32 @llvm.xcore.getps(i32 %reg)
|
|
|
|
ret i32 %result
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
define void @setps(i32 %reg, i32 %value) nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: setps:
|
2011-03-15 21:45:47 +08:00
|
|
|
; CHECK: set ps[r0], r1
|
|
|
|
call void @llvm.xcore.setps(i32 %reg, i32 %value)
|
|
|
|
ret void
|
|
|
|
}
|