1
2
3
4
5
6
7
8
9
10
11
12#include <asm/spu_csa.h>
13
14.data
15.align 7
16.globl regs_spill
17regs_spill:
18.space SIZEOF_SPU_SPILL_REGS, 0x0
19
20.text
21.global _start
22_start:
23
24 stqa $0, regs_spill + 0
25 stqa $1, regs_spill + 16
26 stqa $2, regs_spill + 32
27 stqa $3, regs_spill + 48
28 stqa $4, regs_spill + 64
29 stqa $5, regs_spill + 80
30 stqa $6, regs_spill + 96
31 stqa $7, regs_spill + 112
32 stqa $8, regs_spill + 128
33 stqa $9, regs_spill + 144
34 stqa $10, regs_spill + 160
35 stqa $11, regs_spill + 176
36 stqa $12, regs_spill + 192
37 stqa $13, regs_spill + 208
38 stqa $14, regs_spill + 224
39 stqa $15, regs_spill + 240
40
41
42 ila $3, regs_spill + 256
43save_regs:
44 lqr $4, save_reg_insts
45save_reg_loop:
46 ai $4, $4, 4
47 .balignl 16, 0x40200000
48save_reg_insts:
49 stqd $16, 0($3)
50 stqd $17, 16($3)
51 stqd $18, 32($3)
52 stqd $19, 48($3)
53 andi $5, $4, 0x7F
54 stqr $4, save_reg_insts
55 ai $3, $3, 64
56 brnz $5, save_reg_loop
57
58
59
60
61
62 il $0, 0
63 il $SP, 16368
64 stqd $0, 0($SP)
65
66
67
68
69
70 stqd $SP, -160($SP)
71 ai $SP, $SP, -160
72
73
74 brsl $0, main
75
76
77
78
79
80.global exit
81.global _exit
82exit:
83_exit:
84 stop 0x0
85
86
87.balignl 16, 0x0
88
89