21 #ifndef _PARISC_ASSEMBLY_H
22 #define _PARISC_ASSEMBLY_H
24 #define CALLEE_FLOAT_FRAME_SIZE 80
35 #define COND(x) * ## x
37 #define FRAME_SIZE 128
38 #define CALLEE_REG_FRAME_SIZE 144
39 #define ASM_ULONG_INSN .dword
52 #define CALLEE_REG_FRAME_SIZE 128
53 #define ASM_ULONG_INSN .word
56 #define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE)
80 #include <asm/asm-offsets.h>
82 #include <asm/types.h>
99 .macro tophys grvirt, grphys
101 sub \grvirt, \grphys, \grphys
104 .macro tovirt grphys, grvirt
106 add \grphys, \grvirt, \grvirt
133 dep,
z \r, 31-(\sa), 32-(\sa), \t
138 depw,
z \r, 31-(\sa), 32-(\sa), \t
143 depd,
z \r, 63-(\sa), 64-(\sa), \t
153 extrd,
u \r, 63-(\sa), 64-(\sa), \t
176 #define REST_SP(r, where) LDREG where, %r1 ! mtsp %r1, r
177 #define SAVE_CR(r, where) mfctl r, %r1 ! STREG %r1, where
178 #define REST_CR(r, where) LDREG where, %r1 ! mtctl %r1, r
180 .macro save_general
regs
214 .macro rest_general
regs
217 LDREG PT_GR3 (\regs), %r3
218 LDREG PT_GR4 (\regs), %r4
219 LDREG PT_GR5 (\regs), %r5
220 LDREG PT_GR6 (\regs), %r6
221 LDREG PT_GR7 (\regs), %r7
222 LDREG PT_GR8 (\regs), %r8
223 LDREG PT_GR9 (\regs), %r9
224 LDREG PT_GR10(\regs), %r10
225 LDREG PT_GR11(\regs), %r11
226 LDREG PT_GR12(\regs), %r12
227 LDREG PT_GR13(\regs), %r13
228 LDREG PT_GR14(\regs), %r14
229 LDREG PT_GR15(\regs), %r15
230 LDREG PT_GR16(\regs), %r16
231 LDREG PT_GR17(\regs), %r17
232 LDREG PT_GR18(\regs), %r18
233 LDREG PT_GR19(\regs), %r19
234 LDREG PT_GR20(\regs), %r20
235 LDREG PT_GR21(\regs), %r21
236 LDREG PT_GR22(\regs), %r22
237 LDREG PT_GR23(\regs), %r23
238 LDREG PT_GR24(\regs), %r24
239 LDREG PT_GR25(\regs), %r25
241 LDREG PT_GR27(\regs), %r27
242 LDREG PT_GR28(\regs), %r28
245 LDREG PT_GR31(\regs), %r31
249 fstd,ma %
fr0, 8(\regs)
250 fstd,ma %fr1, 8(\regs)
251 fstd,ma %fr2, 8(\regs)
252 fstd,ma %fr3, 8(\regs)
253 fstd,ma %fr4, 8(\regs)
254 fstd,ma %fr5, 8(\regs)
255 fstd,ma %fr6, 8(\regs)
256 fstd,ma %fr7, 8(\regs)
257 fstd,ma %fr8, 8(\regs)
258 fstd,ma %fr9, 8(\regs)
259 fstd,ma %fr10, 8(\regs)
260 fstd,ma %fr11, 8(\regs)
261 fstd,ma %fr12, 8(\regs)
262 fstd,ma %fr13, 8(\regs)
263 fstd,ma %fr14, 8(\regs)
264 fstd,ma %fr15, 8(\regs)
265 fstd,ma %fr16, 8(\regs)
266 fstd,ma %fr17, 8(\regs)
267 fstd,ma %fr18, 8(\regs)
268 fstd,ma %fr19, 8(\regs)
269 fstd,ma %fr20, 8(\regs)
270 fstd,ma %fr21, 8(\regs)
271 fstd,ma %fr22, 8(\regs)
272 fstd,ma %fr23, 8(\regs)
273 fstd,ma %fr24, 8(\regs)
274 fstd,ma %fr25, 8(\regs)
275 fstd,ma %fr26, 8(\regs)
276 fstd,ma %fr27, 8(\regs)
277 fstd,ma %fr28, 8(\regs)
278 fstd,ma %fr29, 8(\regs)
279 fstd,ma %fr30, 8(\regs)
285 fldd,
mb -8(\regs), %fr30
286 fldd,
mb -8(\regs), %fr29
287 fldd,
mb -8(\regs), %fr28
288 fldd,
mb -8(\regs), %fr27
289 fldd,
mb -8(\regs), %fr26
290 fldd,
mb -8(\regs), %fr25
291 fldd,
mb -8(\regs), %fr24
292 fldd,
mb -8(\regs), %fr23
293 fldd,
mb -8(\regs), %fr22
294 fldd,
mb -8(\regs), %fr21
295 fldd,
mb -8(\regs), %fr20
296 fldd,
mb -8(\regs), %fr19
297 fldd,
mb -8(\regs), %fr18
298 fldd,
mb -8(\regs), %fr17
299 fldd,
mb -8(\regs), %fr16
300 fldd,
mb -8(\regs), %fr15
301 fldd,
mb -8(\regs), %fr14
302 fldd,
mb -8(\regs), %fr13
303 fldd,
mb -8(\regs), %fr12
304 fldd,
mb -8(\regs), %fr11
305 fldd,
mb -8(\regs), %fr10
306 fldd,
mb -8(\regs), %fr9
307 fldd,
mb -8(\regs), %fr8
308 fldd,
mb -8(\regs), %fr7
309 fldd,
mb -8(\regs), %fr6
310 fldd,
mb -8(\regs), %fr5
311 fldd,
mb -8(\regs), %fr4
312 fldd,
mb -8(\regs), %fr3
313 fldd,
mb -8(\regs), %fr2
314 fldd,
mb -8(\regs), %fr1
315 fldd,
mb -8(\regs), %fr0
318 .macro callee_save_float
319 fstd,ma %fr12, 8(%
r30)
320 fstd,ma %fr13, 8(%
r30)
321 fstd,ma %fr14, 8(%
r30)
322 fstd,ma %fr15, 8(%
r30)
323 fstd,ma %fr16, 8(%
r30)
324 fstd,ma %fr17, 8(%
r30)
325 fstd,ma %fr18, 8(%
r30)
326 fstd,ma %fr19, 8(%
r30)
327 fstd,ma %fr20, 8(%
r30)
328 fstd,ma %fr21, 8(%
r30)
331 .macro callee_rest_float
332 fldd,
mb -8(%
r30), %fr21
333 fldd,
mb -8(%r30), %fr20
334 fldd,
mb -8(%r30), %fr19
335 fldd,
mb -8(%r30), %fr18
336 fldd,
mb -8(%r30), %fr17
337 fldd,
mb -8(%r30), %fr16
338 fldd,
mb -8(%r30), %fr15
339 fldd,
mb -8(%r30), %fr14
340 fldd,
mb -8(%r30), %fr13
341 fldd,
mb -8(%r30), %fr12
432 .macro save_specials regs
434 SAVE_SP (%
sr0, PT_SR0 (\regs))
435 SAVE_SP (%sr1, PT_SR1 (\regs))
436 SAVE_SP (%sr2, PT_SR2 (\regs))
437 SAVE_SP (%sr3, PT_SR3 (\regs))
438 SAVE_SP (%sr4, PT_SR4 (\regs))
439 SAVE_SP (%sr5, PT_SR5 (\regs))
440 SAVE_SP (%sr6, PT_SR6 (\regs))
441 SAVE_SP (%sr7, PT_SR7 (\regs))
443 SAVE_CR (%cr17, PT_IASQ0(\regs))
445 SAVE_CR (%cr17, PT_IASQ1(\regs))
447 SAVE_CR (%cr18, PT_IAOQ0(\regs))
449 SAVE_CR (%cr18, PT_IAOQ1(\regs))
460 SAVE_CR (%cr11, PT_SAR (\regs))
462 SAVE_CR (%cr19, PT_IIR (\regs))
472 .macro rest_specials regs
474 REST_SP (%
sr0, PT_SR0 (\regs))
475 REST_SP (%sr1, PT_SR1 (\regs))
476 REST_SP (%sr2, PT_SR2 (\regs))
477 REST_SP (%sr3, PT_SR3 (\regs))
478 REST_SP (%sr4, PT_SR4 (\regs))
479 REST_SP (%sr5, PT_SR5 (\regs))
480 REST_SP (%sr6, PT_SR6 (\regs))
481 REST_SP (%sr7, PT_SR7 (\regs))
483 REST_CR (%cr17, PT_IASQ0(\regs))
484 REST_CR (%cr17, PT_IASQ1(\regs))
486 REST_CR (%cr18, PT_IAOQ0(\regs))
487 REST_CR (%cr18, PT_IAOQ1(\regs))
489 REST_CR (%cr11, PT_SAR (\regs))
491 REST_CR (%cr22,
PT_PSW (\regs))