mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
5aad8b3e78
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127678 91177308-0d34-0410-b5e6-96231b3b80d8
19 lines
424 B
LLVM
19 lines
424 B
LLVM
; 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 {
|
|
; CHECK: getps:
|
|
; CHECK: get r0, ps[r0]
|
|
%result = call i32 @llvm.xcore.getps(i32 %reg)
|
|
ret i32 %result
|
|
}
|
|
|
|
|
|
define void @setps(i32 %reg, i32 %value) nounwind {
|
|
; CHECK: setps:
|
|
; CHECK: set ps[r0], r1
|
|
call void @llvm.xcore.setps(i32 %reg, i32 %value)
|
|
ret void
|
|
}
|