resources.ll
7.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
; RUN: llc -march=xcore < %s | FileCheck %s
declare i8 addrspace(1)* @llvm.xcore.getr.p1i8(i32 %type)
declare void @llvm.xcore.freer.p1i8(i8 addrspace(1)* %r)
declare i32 @llvm.xcore.in.p1i8(i8 addrspace(1)* %r)
declare i32 @llvm.xcore.int.p1i8(i8 addrspace(1)* %r)
declare i32 @llvm.xcore.inct.p1i8(i8 addrspace(1)* %r)
declare void @llvm.xcore.out.p1i8(i8 addrspace(1)* %r, i32 %value)
declare void @llvm.xcore.outt.p1i8(i8 addrspace(1)* %r, i32 %value)
declare void @llvm.xcore.outct.p1i8(i8 addrspace(1)* %r, i32 %value)
declare void @llvm.xcore.chkct.p1i8(i8 addrspace(1)* %r, i32 %value)
declare i32 @llvm.xcore.testct.p1i8(i8 addrspace(1)* %r)
declare i32 @llvm.xcore.testwct.p1i8(i8 addrspace(1)* %r)
declare void @llvm.xcore.setd.p1i8(i8 addrspace(1)* %r, i32 %value)
declare void @llvm.xcore.setc.p1i8(i8 addrspace(1)* %r, i32 %value)
declare i32 @llvm.xcore.inshr.p1i8(i8 addrspace(1)* %r, i32 %value)
declare i32 @llvm.xcore.outshr.p1i8(i8 addrspace(1)* %r, i32 %value)
declare void @llvm.xcore.clrpt.p1i8(i8 addrspace(1)* %r)
declare void @llvm.xcore.setpt.p1i8(i8 addrspace(1)* %r, i32 %value)
declare i32 @llvm.xcore.getts.p1i8(i8 addrspace(1)* %r)
declare void @llvm.xcore.syncr.p1i8(i8 addrspace(1)* %r)
declare void @llvm.xcore.settw.p1i8(i8 addrspace(1)* %r, i32 %value)
declare void @llvm.xcore.setv.p1i8(i8 addrspace(1)* %r, i8* %p)
declare void @llvm.xcore.setev.p1i8(i8 addrspace(1)* %r, i8* %p)
declare void @llvm.xcore.edu.p1i8(i8 addrspace(1)* %r)
declare void @llvm.xcore.eeu.p1i8(i8 addrspace(1)* %r)
declare void @llvm.xcore.setclk.p1i8.p1i8(i8 addrspace(1)* %a, i8 addrspace(1)* %b)
declare void @llvm.xcore.setrdy.p1i8.p1i8(i8 addrspace(1)* %a, i8 addrspace(1)* %b)
declare void @llvm.xcore.setpsc.p1i8(i8 addrspace(1)* %r, i32 %value)
declare i32 @llvm.xcore.peek.p1i8(i8 addrspace(1)* %r)
declare i32 @llvm.xcore.endin.p1i8(i8 addrspace(1)* %r)
define i8 addrspace(1)* @getr() {
; CHECK-LABEL: getr:
; CHECK: getr r0, 5
%result = call i8 addrspace(1)* @llvm.xcore.getr.p1i8(i32 5)
ret i8 addrspace(1)* %result
}
define void @freer(i8 addrspace(1)* %r) {
; CHECK-LABEL: freer:
; CHECK: freer res[r0]
call void @llvm.xcore.freer.p1i8(i8 addrspace(1)* %r)
ret void
}
define i32 @in(i8 addrspace(1)* %r) {
; CHECK-LABEL: in:
; CHECK: in r0, res[r0]
%result = call i32 @llvm.xcore.in.p1i8(i8 addrspace(1)* %r)
ret i32 %result
}
define i32 @int(i8 addrspace(1)* %r) {
; CHECK-LABEL: int:
; CHECK: int r0, res[r0]
%result = call i32 @llvm.xcore.int.p1i8(i8 addrspace(1)* %r)
ret i32 %result
}
define i32 @inct(i8 addrspace(1)* %r) {
; CHECK-LABEL: inct:
; CHECK: inct r0, res[r0]
%result = call i32 @llvm.xcore.inct.p1i8(i8 addrspace(1)* %r)
ret i32 %result
}
define void @out(i8 addrspace(1)* %r, i32 %value) {
; CHECK-LABEL: out:
; CHECK: out res[r0], r1
call void @llvm.xcore.out.p1i8(i8 addrspace(1)* %r, i32 %value)
ret void
}
define void @outt(i8 addrspace(1)* %r, i32 %value) {
; CHECK-LABEL: outt:
; CHECK: outt res[r0], r1
call void @llvm.xcore.outt.p1i8(i8 addrspace(1)* %r, i32 %value)
ret void
}
define void @outct(i8 addrspace(1)* %r, i32 %value) {
; CHECK-LABEL: outct:
; CHECK: outct res[r0], r1
call void @llvm.xcore.outct.p1i8(i8 addrspace(1)* %r, i32 %value)
ret void
}
define void @outcti(i8 addrspace(1)* %r) {
; CHECK-LABEL: outcti:
; CHECK: outct res[r0], 11
call void @llvm.xcore.outct.p1i8(i8 addrspace(1)* %r, i32 11)
ret void
}
define void @chkct(i8 addrspace(1)* %r, i32 %value) {
; CHECK-LABEL: chkct:
; CHECK: chkct res[r0], r1
call void @llvm.xcore.chkct.p1i8(i8 addrspace(1)* %r, i32 %value)
ret void
}
define void @chkcti(i8 addrspace(1)* %r) {
; CHECK-LABEL: chkcti:
; CHECK: chkct res[r0], 11
call void @llvm.xcore.chkct.p1i8(i8 addrspace(1)* %r, i32 11)
ret void
}
define void @setd(i8 addrspace(1)* %r, i32 %value) {
; CHECK-LABEL: setd:
; CHECK: setd res[r0], r1
call void @llvm.xcore.setd.p1i8(i8 addrspace(1)* %r, i32 %value)
ret void
}
define void @setc(i8 addrspace(1)* %r, i32 %value) {
; CHECK-LABEL: setc:
; CHECK: setc res[r0], r1
call void @llvm.xcore.setc.p1i8(i8 addrspace(1)* %r, i32 %value)
ret void
}
define void @setci(i8 addrspace(1)* %r) {
; CHECK-LABEL: setci:
; CHECK: setc res[r0], 2
call void @llvm.xcore.setc.p1i8(i8 addrspace(1)* %r, i32 2)
ret void
}
define i32 @inshr(i32 %value, i8 addrspace(1)* %r) {
; CHECK-LABEL: inshr:
; CHECK: inshr r0, res[r1]
%result = call i32 @llvm.xcore.inshr.p1i8(i8 addrspace(1)* %r, i32 %value)
ret i32 %result
}
define i32 @outshr(i32 %value, i8 addrspace(1)* %r) {
; CHECK-LABEL: outshr:
; CHECK: outshr res[r1], r0
%result = call i32 @llvm.xcore.outshr.p1i8(i8 addrspace(1)* %r, i32 %value)
ret i32 %result
}
define void @clrpt(i8 addrspace(1)* %r) {
; CHECK-LABEL: clrpt:
; CHECK: clrpt res[r0]
call void @llvm.xcore.clrpt.p1i8(i8 addrspace(1)* %r)
ret void
}
define void @setpt(i8 addrspace(1)* %r, i32 %value) {
; CHECK-LABEL: setpt:
; CHECK: setpt res[r0], r1
call void @llvm.xcore.setpt.p1i8(i8 addrspace(1)* %r, i32 %value)
ret void
}
define i32 @getts(i8 addrspace(1)* %r) {
; CHECK-LABEL: getts:
; CHECK: getts r0, res[r0]
%result = call i32 @llvm.xcore.getts.p1i8(i8 addrspace(1)* %r)
ret i32 %result
}
define void @syncr(i8 addrspace(1)* %r) {
; CHECK-LABEL: syncr:
; CHECK: syncr res[r0]
call void @llvm.xcore.syncr.p1i8(i8 addrspace(1)* %r)
ret void
}
define void @settw(i8 addrspace(1)* %r, i32 %value) {
; CHECK-LABEL: settw:
; CHECK: settw res[r0], r1
call void @llvm.xcore.settw.p1i8(i8 addrspace(1)* %r, i32 %value)
ret void
}
define void @setv(i8 addrspace(1)* %r, i8* %p) {
; CHECK-LABEL: setv:
; CHECK: mov r11, r1
; CHECK-NEXT: setv res[r0], r11
call void @llvm.xcore.setv.p1i8(i8 addrspace(1)* %r, i8* %p)
ret void
}
define void @setev(i8 addrspace(1)* %r, i8* %p) {
; CHECK-LABEL: setev:
; CHECK: mov r11, r1
; CHECK-NEXT: setev res[r0], r11
call void @llvm.xcore.setev.p1i8(i8 addrspace(1)* %r, i8* %p)
ret void
}
define void @edu(i8 addrspace(1)* %r) {
; CHECK-LABEL: edu:
; CHECK: edu res[r0]
call void @llvm.xcore.edu.p1i8(i8 addrspace(1)* %r)
ret void
}
define void @eeu(i8 addrspace(1)* %r) {
; CHECK-LABEL: eeu:
; CHECK: eeu res[r0]
call void @llvm.xcore.eeu.p1i8(i8 addrspace(1)* %r)
ret void
}
define void @setclk(i8 addrspace(1)* %a, i8 addrspace(1)* %b) {
; CHECK: setclk
; CHECK: setclk res[r0], r1
call void @llvm.xcore.setclk.p1i8.p1i8(i8 addrspace(1)* %a, i8 addrspace(1)* %b)
ret void
}
define void @setrdy(i8 addrspace(1)* %a, i8 addrspace(1)* %b) {
; CHECK: setrdy
; CHECK: setrdy res[r0], r1
call void @llvm.xcore.setrdy.p1i8.p1i8(i8 addrspace(1)* %a, i8 addrspace(1)* %b)
ret void
}
define void @setpsc(i8 addrspace(1)* %r, i32 %value) {
; CHECK: setpsc
; CHECK: setpsc res[r0], r1
call void @llvm.xcore.setpsc.p1i8(i8 addrspace(1)* %r, i32 %value)
ret void
}
define i32 @peek(i8 addrspace(1)* %r) {
; CHECK-LABEL: peek:
; CHECK: peek r0, res[r0]
%result = call i32 @llvm.xcore.peek.p1i8(i8 addrspace(1)* %r)
ret i32 %result
}
define i32 @endin(i8 addrspace(1)* %r) {
; CHECK-LABEL: endin:
; CHECK: endin r0, res[r0]
%result = call i32 @llvm.xcore.endin.p1i8(i8 addrspace(1)* %r)
ret i32 %result
}
define i32 @testct(i8 addrspace(1)* %r) {
; CHECK-LABEL: testct:
; CHECK: testct r0, res[r0]
%result = call i32 @llvm.xcore.testct.p1i8(i8 addrspace(1)* %r)
ret i32 %result
}
define i32 @testwct(i8 addrspace(1)* %r) {
; CHECK-LABEL: testwct:
; CHECK: testwct r0, res[r0]
%result = call i32 @llvm.xcore.testwct.p1i8(i8 addrspace(1)* %r)
ret i32 %result
}