mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-22 07:32:48 +00:00
9497466190
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132340 91177308-0d34-0410-b5e6-96231b3b80d8
28 lines
697 B
LLVM
28 lines
697 B
LLVM
; RUN: llc < %s -march=xcore | FileCheck %s
|
|
%0 = type { i32, i32 }
|
|
|
|
declare i32 @llvm.xcore.bitrev(i32)
|
|
declare i32 @llvm.xcore.crc32(i32, i32, i32)
|
|
declare %0 @llvm.xcore.crc8(i32, i32, i32)
|
|
|
|
define i32 @bitrev(i32 %val) {
|
|
; CHECK: bitrev:
|
|
; CHECK: bitrev r0, r0
|
|
%result = call i32 @llvm.xcore.bitrev(i32 %val)
|
|
ret i32 %result
|
|
}
|
|
|
|
define i32 @crc32(i32 %crc, i32 %data, i32 %poly) {
|
|
; CHECK: crc32:
|
|
; CHECK: crc32 r0, r1, r2
|
|
%result = call i32 @llvm.xcore.crc32(i32 %crc, i32 %data, i32 %poly)
|
|
ret i32 %result
|
|
}
|
|
|
|
define %0 @crc8(i32 %crc, i32 %data, i32 %poly) {
|
|
; CHECK: crc8:
|
|
; CHECK: crc8 r0, r1, r1, r2
|
|
%result = call %0 @llvm.xcore.crc8(i32 %crc, i32 %data, i32 %poly)
|
|
ret %0 %result
|
|
}
|