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 #ifndef _XTENSA_CORE_TIE_ASM_H
33 #define _XTENSA_CORE_TIE_ASM_H
34
35
36
37 #define XTHAL_SAS_TIE 0x0001
38 #define XTHAL_SAS_OPT 0x0002
39 #define XTHAL_SAS_ANYOT 0x0003
40
41 #define XTHAL_SAS_NOCC 0x0004
42 #define XTHAL_SAS_CC 0x0008
43 #define XTHAL_SAS_ANYCC 0x000C
44
45 #define XTHAL_SAS_CALR 0x0010
46 #define XTHAL_SAS_CALE 0x0020
47 #define XTHAL_SAS_GLOB 0x0040
48 #define XTHAL_SAS_ANYABI 0x0070
49
50 #define XTHAL_SAS_ALL 0xFFFF
51 #define XTHAL_SAS3(optie,ccuse,abi) ( ((optie) & XTHAL_SAS_ANYOT) \
52 | ((ccuse) & XTHAL_SAS_ANYCC) \
53 | ((abi) & XTHAL_SAS_ANYABI) )
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
77 xchal_sa_start \continue, \ofs
78
79 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~(\select)
80 xchal_sa_align \ptr, 0, 1020, 4, 4
81 rur.THREADPTR \at1
82 s32i \at1, \ptr, .Lxchal_ofs_+0
83 .set .Lxchal_ofs_, .Lxchal_ofs_ + 4
84 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~(\alloc)) == 0
85 xchal_sa_align \ptr, 0, 1020, 4, 4
86 .set .Lxchal_ofs_, .Lxchal_ofs_ + 4
87 .endif
88
89 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~(\select)
90 xchal_sa_align \ptr, 0, 1016, 4, 4
91 rsr.ACCLO \at1
92 s32i \at1, \ptr, .Lxchal_ofs_+0
93 rsr.ACCHI \at1
94 s32i \at1, \ptr, .Lxchal_ofs_+4
95 .set .Lxchal_ofs_, .Lxchal_ofs_ + 8
96 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
97 xchal_sa_align \ptr, 0, 1016, 4, 4
98 .set .Lxchal_ofs_, .Lxchal_ofs_ + 8
99 .endif
100
101 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\select)
102 xchal_sa_align \ptr, 0, 1000, 4, 4
103 rsr.BR \at1
104 s32i \at1, \ptr, .Lxchal_ofs_+0
105 rsr.SCOMPARE1 \at1
106 s32i \at1, \ptr, .Lxchal_ofs_+4
107 rsr.M0 \at1
108 s32i \at1, \ptr, .Lxchal_ofs_+8
109 rsr.M1 \at1
110 s32i \at1, \ptr, .Lxchal_ofs_+12
111 rsr.M2 \at1
112 s32i \at1, \ptr, .Lxchal_ofs_+16
113 rsr.M3 \at1
114 s32i \at1, \ptr, .Lxchal_ofs_+20
115 .set .Lxchal_ofs_, .Lxchal_ofs_ + 24
116 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
117 xchal_sa_align \ptr, 0, 1000, 4, 4
118 .set .Lxchal_ofs_, .Lxchal_ofs_ + 24
119 .endif
120 .endm
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
143 xchal_sa_start \continue, \ofs
144
145 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~(\select)
146 xchal_sa_align \ptr, 0, 1020, 4, 4
147 l32i \at1, \ptr, .Lxchal_ofs_+0
148 wur.THREADPTR \at1
149 .set .Lxchal_ofs_, .Lxchal_ofs_ + 4
150 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~(\alloc)) == 0
151 xchal_sa_align \ptr, 0, 1020, 4, 4
152 .set .Lxchal_ofs_, .Lxchal_ofs_ + 4
153 .endif
154
155 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~(\select)
156 xchal_sa_align \ptr, 0, 1016, 4, 4
157 l32i \at1, \ptr, .Lxchal_ofs_+0
158 wsr.ACCLO \at1
159 l32i \at1, \ptr, .Lxchal_ofs_+4
160 wsr.ACCHI \at1
161 .set .Lxchal_ofs_, .Lxchal_ofs_ + 8
162 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
163 xchal_sa_align \ptr, 0, 1016, 4, 4
164 .set .Lxchal_ofs_, .Lxchal_ofs_ + 8
165 .endif
166
167 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\select)
168 xchal_sa_align \ptr, 0, 1000, 4, 4
169 l32i \at1, \ptr, .Lxchal_ofs_+0
170 wsr.BR \at1
171 l32i \at1, \ptr, .Lxchal_ofs_+4
172 wsr.SCOMPARE1 \at1
173 l32i \at1, \ptr, .Lxchal_ofs_+8
174 wsr.M0 \at1
175 l32i \at1, \ptr, .Lxchal_ofs_+12
176 wsr.M1 \at1
177 l32i \at1, \ptr, .Lxchal_ofs_+16
178 wsr.M2 \at1
179 l32i \at1, \ptr, .Lxchal_ofs_+20
180 wsr.M3 \at1
181 .set .Lxchal_ofs_, .Lxchal_ofs_ + 24
182 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
183 xchal_sa_align \ptr, 0, 1000, 4, 4
184 .set .Lxchal_ofs_, .Lxchal_ofs_ + 24
185 .endif
186 .endm
187
188
189 #define XCHAL_NCP_NUM_ATMPS 1
190
191
192
193
194
195
196
197
198
199
200 #define xchal_cp_AudioEngineLX_store xchal_cp1_store
201 .macro xchal_cp1_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
202 xchal_sa_start \continue, \ofs
203
204 .ifeq (XTHAL_SAS_TIE | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\select)
205 xchal_sa_align \ptr, 0, 0, 8, 8
206 rur.AE_OVF_SAR \at1
207 s32i \at1, \ptr, .Lxchal_ofs_+0
208 rur.AE_BITHEAD \at1
209 s32i \at1, \ptr, .Lxchal_ofs_+4
210 rur.AE_TS_FTS_BU_BP \at1
211 s32i \at1, \ptr, .Lxchal_ofs_+8
212 rur.AE_SD_NO \at1
213 s32i \at1, \ptr, .Lxchal_ofs_+12
214 rur.AE_CBEGIN0 \at1
215 s32i \at1, \ptr, .Lxchal_ofs_+16
216 rur.AE_CEND0 \at1
217 s32i \at1, \ptr, .Lxchal_ofs_+20
218 ae_sp24x2s.i aep0, \ptr, .Lxchal_ofs_+24
219 ae_sp24x2s.i aep1, \ptr, .Lxchal_ofs_+32
220 ae_sp24x2s.i aep2, \ptr, .Lxchal_ofs_+40
221 ae_sp24x2s.i aep3, \ptr, .Lxchal_ofs_+48
222 ae_sp24x2s.i aep4, \ptr, .Lxchal_ofs_+56
223 addi \ptr, \ptr, 64
224 ae_sp24x2s.i aep5, \ptr, .Lxchal_ofs_+0
225 ae_sp24x2s.i aep6, \ptr, .Lxchal_ofs_+8
226 ae_sp24x2s.i aep7, \ptr, .Lxchal_ofs_+16
227 ae_sq56s.i aeq0, \ptr, .Lxchal_ofs_+24
228 ae_sq56s.i aeq1, \ptr, .Lxchal_ofs_+32
229 ae_sq56s.i aeq2, \ptr, .Lxchal_ofs_+40
230 ae_sq56s.i aeq3, \ptr, .Lxchal_ofs_+48
231 .set .Lxchal_pofs_, .Lxchal_pofs_ + 64
232 .set .Lxchal_ofs_, .Lxchal_ofs_ + 56
233 .elseif ((XTHAL_SAS_TIE | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
234 xchal_sa_align \ptr, 0, 0, 8, 8
235 .set .Lxchal_ofs_, .Lxchal_ofs_ + 120
236 .endif
237 .endm
238
239
240
241
242
243
244
245
246
247
248 #define xchal_cp_AudioEngineLX_load xchal_cp1_load
249 .macro xchal_cp1_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
250 xchal_sa_start \continue, \ofs
251
252 .ifeq (XTHAL_SAS_TIE | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\select)
253 xchal_sa_align \ptr, 0, 0, 8, 8
254 l32i \at1, \ptr, .Lxchal_ofs_+0
255 wur.AE_OVF_SAR \at1
256 l32i \at1, \ptr, .Lxchal_ofs_+4
257 wur.AE_BITHEAD \at1
258 l32i \at1, \ptr, .Lxchal_ofs_+8
259 wur.AE_TS_FTS_BU_BP \at1
260 l32i \at1, \ptr, .Lxchal_ofs_+12
261 wur.AE_SD_NO \at1
262 l32i \at1, \ptr, .Lxchal_ofs_+16
263 wur.AE_CBEGIN0 \at1
264 l32i \at1, \ptr, .Lxchal_ofs_+20
265 wur.AE_CEND0 \at1
266 ae_lp24x2.i aep0, \ptr, .Lxchal_ofs_+24
267 ae_lp24x2.i aep1, \ptr, .Lxchal_ofs_+32
268 ae_lp24x2.i aep2, \ptr, .Lxchal_ofs_+40
269 ae_lp24x2.i aep3, \ptr, .Lxchal_ofs_+48
270 ae_lp24x2.i aep4, \ptr, .Lxchal_ofs_+56
271 addi \ptr, \ptr, 64
272 ae_lp24x2.i aep5, \ptr, .Lxchal_ofs_+0
273 ae_lp24x2.i aep6, \ptr, .Lxchal_ofs_+8
274 ae_lp24x2.i aep7, \ptr, .Lxchal_ofs_+16
275 addi \ptr, \ptr, 24
276 ae_lq56.i aeq0, \ptr, .Lxchal_ofs_+0
277 ae_lq56.i aeq1, \ptr, .Lxchal_ofs_+8
278 ae_lq56.i aeq2, \ptr, .Lxchal_ofs_+16
279 ae_lq56.i aeq3, \ptr, .Lxchal_ofs_+24
280 .set .Lxchal_pofs_, .Lxchal_pofs_ + 88
281 .set .Lxchal_ofs_, .Lxchal_ofs_ + 32
282 .elseif ((XTHAL_SAS_TIE | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
283 xchal_sa_align \ptr, 0, 0, 8, 8
284 .set .Lxchal_ofs_, .Lxchal_ofs_ + 120
285 .endif
286 .endm
287
288 #define XCHAL_CP1_NUM_ATMPS 1
289 #define XCHAL_SA_NUM_ATMPS 1
290
291
292 .macro xchal_cp0_store p a b c d continue=0 ofs=-1 select=-1 ; .endm
293 .macro xchal_cp0_load p a b c d continue=0 ofs=-1 select=-1 ; .endm
294 .macro xchal_cp2_store p a b c d continue=0 ofs=-1 select=-1 ; .endm
295 .macro xchal_cp2_load p a b c d continue=0 ofs=-1 select=-1 ; .endm
296 .macro xchal_cp3_store p a b c d continue=0 ofs=-1 select=-1 ; .endm
297 .macro xchal_cp3_load p a b c d continue=0 ofs=-1 select=-1 ; .endm
298 .macro xchal_cp4_store p a b c d continue=0 ofs=-1 select=-1 ; .endm
299 .macro xchal_cp4_load p a b c d continue=0 ofs=-1 select=-1 ; .endm
300 .macro xchal_cp5_store p a b c d continue=0 ofs=-1 select=-1 ; .endm
301 .macro xchal_cp5_load p a b c d continue=0 ofs=-1 select=-1 ; .endm
302 .macro xchal_cp6_store p a b c d continue=0 ofs=-1 select=-1 ; .endm
303 .macro xchal_cp6_load p a b c d continue=0 ofs=-1 select=-1 ; .endm
304 .macro xchal_cp7_store p a b c d continue=0 ofs=-1 select=-1 ; .endm
305 .macro xchal_cp7_load p a b c d continue=0 ofs=-1 select=-1 ; .endm
306
307 #endif
308