summaryrefslogtreecommitdiff
path: root/asm/SDK/DWC/dwc_common/dwc_report.s
blob: 9481281db82ec73b27afb0e345772ea9d4a5359f (plain)
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
.include "macros.inc"

.section .text, "ax"  # 0x80006980 - 0x803E1E60

.global DWC_SetReportLevel
DWC_SetReportLevel:
/* 8031CB2C 0031878C  90 6D B0 28 */	stw r3, lbl_806402E8-_SDA_BASE_(r13)
/* 8031CB30 00318790  4E 80 00 20 */	blr

.global DWC_Printf
DWC_Printf:
/* 8031CB34 00318794  94 21 FF 80 */	stwu r1, -0x80(r1)
/* 8031CB38 00318798  7C 08 02 A6 */	mflr r0
/* 8031CB3C 0031879C  90 01 00 84 */	stw r0, 0x84(r1)
/* 8031CB40 003187A0  93 E1 00 7C */	stw r31, 0x7c(r1)
/* 8031CB44 003187A4  7C 9F 23 78 */	mr r31, r4
/* 8031CB48 003187A8  40 86 00 24 */	bne cr1, lbl_8031CB6C
/* 8031CB4C 003187AC  D8 21 00 28 */	stfd f1, 0x28(r1)
/* 8031CB50 003187B0  D8 41 00 30 */	stfd f2, 0x30(r1)
/* 8031CB54 003187B4  D8 61 00 38 */	stfd f3, 0x38(r1)
/* 8031CB58 003187B8  D8 81 00 40 */	stfd f4, 0x40(r1)
/* 8031CB5C 003187BC  D8 A1 00 48 */	stfd f5, 0x48(r1)
/* 8031CB60 003187C0  D8 C1 00 50 */	stfd f6, 0x50(r1)
/* 8031CB64 003187C4  D8 E1 00 58 */	stfd f7, 0x58(r1)
/* 8031CB68 003187C8  D9 01 00 60 */	stfd f8, 0x60(r1)
lbl_8031CB6C:
/* 8031CB6C 003187CC  80 0D B0 28 */	lwz r0, lbl_806402E8-_SDA_BASE_(r13)
/* 8031CB70 003187D0  3D 60 80 44 */	lis r11, lbl_80446968@ha
/* 8031CB74 003187D4  90 61 00 08 */	stw r3, 8(r1)
/* 8031CB78 003187D8  39 6B 69 68 */	addi r11, r11, lbl_80446968@l
/* 8031CB7C 003187DC  7C 60 00 39 */	and. r0, r3, r0
/* 8031CB80 003187E0  90 81 00 0C */	stw r4, 0xc(r1)
/* 8031CB84 003187E4  90 A1 00 10 */	stw r5, 0x10(r1)
/* 8031CB88 003187E8  90 C1 00 14 */	stw r6, 0x14(r1)
/* 8031CB8C 003187EC  90 E1 00 18 */	stw r7, 0x18(r1)
/* 8031CB90 003187F0  91 01 00 1C */	stw r8, 0x1c(r1)
/* 8031CB94 003187F4  91 21 00 20 */	stw r9, 0x20(r1)
/* 8031CB98 003187F8  91 41 00 24 */	stw r10, 0x24(r1)
/* 8031CB9C 003187FC  41 82 02 AC */	beq lbl_8031CE48
/* 8031CBA0 00318800  2C 03 04 00 */	cmpwi r3, 0x400
/* 8031CBA4 00318804  41 82 01 C4 */	beq lbl_8031CD68
/* 8031CBA8 00318808  40 80 00 90 */	bge lbl_8031CC38
/* 8031CBAC 0031880C  2C 03 00 20 */	cmpwi r3, 0x20
/* 8031CBB0 00318810  41 82 01 68 */	beq lbl_8031CD18
/* 8031CBB4 00318814  40 80 00 54 */	bge lbl_8031CC08
/* 8031CBB8 00318818  2C 03 00 04 */	cmpwi r3, 4
/* 8031CBBC 0031881C  41 82 01 2C */	beq lbl_8031CCE8
/* 8031CBC0 00318820  40 80 00 30 */	bge lbl_8031CBF0
/* 8031CBC4 00318824  2C 03 00 01 */	cmpwi r3, 1
/* 8031CBC8 00318828  41 82 01 00 */	beq lbl_8031CCC8
/* 8031CBCC 0031882C  40 80 00 18 */	bge lbl_8031CBE4
/* 8031CBD0 00318830  3C 80 80 00 */	lis r4, 0x80000001@ha
/* 8031CBD4 00318834  38 04 00 01 */	addi r0, r4, 0x80000001@l
/* 8031CBD8 00318838  7C 03 00 00 */	cmpw r3, r0
/* 8031CBDC 0031883C  40 80 02 3C */	bge lbl_8031CE18
/* 8031CBE0 00318840  48 00 02 28 */	b lbl_8031CE08
lbl_8031CBE4:
/* 8031CBE4 00318844  2C 03 00 03 */	cmpwi r3, 3
/* 8031CBE8 00318848  40 80 02 30 */	bge lbl_8031CE18
/* 8031CBEC 0031884C  48 00 00 EC */	b lbl_8031CCD8
lbl_8031CBF0:
/* 8031CBF0 00318850  2C 03 00 10 */	cmpwi r3, 0x10
/* 8031CBF4 00318854  41 82 01 14 */	beq lbl_8031CD08
/* 8031CBF8 00318858  40 80 02 20 */	bge lbl_8031CE18
/* 8031CBFC 0031885C  2C 03 00 08 */	cmpwi r3, 8
/* 8031CC00 00318860  41 82 00 F8 */	beq lbl_8031CCF8
/* 8031CC04 00318864  48 00 02 14 */	b lbl_8031CE18
lbl_8031CC08:
/* 8031CC08 00318868  2C 03 01 00 */	cmpwi r3, 0x100
/* 8031CC0C 0031886C  41 82 01 3C */	beq lbl_8031CD48
/* 8031CC10 00318870  40 80 00 1C */	bge lbl_8031CC2C
/* 8031CC14 00318874  2C 03 00 80 */	cmpwi r3, 0x80
/* 8031CC18 00318878  41 82 01 20 */	beq lbl_8031CD38
/* 8031CC1C 0031887C  40 80 01 FC */	bge lbl_8031CE18
/* 8031CC20 00318880  2C 03 00 40 */	cmpwi r3, 0x40
/* 8031CC24 00318884  41 82 01 04 */	beq lbl_8031CD28
/* 8031CC28 00318888  48 00 01 F0 */	b lbl_8031CE18
lbl_8031CC2C:
/* 8031CC2C 0031888C  2C 03 02 00 */	cmpwi r3, 0x200
/* 8031CC30 00318890  41 82 01 28 */	beq lbl_8031CD58
/* 8031CC34 00318894  48 00 01 E4 */	b lbl_8031CE18
lbl_8031CC38:
/* 8031CC38 00318898  3C 00 01 00 */	lis r0, 0x100
/* 8031CC3C 0031889C  7C 03 00 00 */	cmpw r3, r0
/* 8031CC40 003188A0  41 82 01 78 */	beq lbl_8031CDB8
/* 8031CC44 003188A4  40 80 00 44 */	bge lbl_8031CC88
/* 8031CC48 003188A8  3C 00 00 02 */	lis r0, 2
/* 8031CC4C 003188AC  7C 03 00 00 */	cmpw r3, r0
/* 8031CC50 003188B0  41 82 01 48 */	beq lbl_8031CD98
/* 8031CC54 003188B4  40 80 00 24 */	bge lbl_8031CC78
/* 8031CC58 003188B8  3C 80 00 01 */	lis r4, 1
/* 8031CC5C 003188BC  7C 03 20 00 */	cmpw r3, r4
/* 8031CC60 003188C0  41 82 01 28 */	beq lbl_8031CD88
/* 8031CC64 003188C4  40 80 01 B4 */	bge lbl_8031CE18
/* 8031CC68 003188C8  38 04 80 00 */	addi r0, r4, -32768
/* 8031CC6C 003188CC  7C 03 00 00 */	cmpw r3, r0
/* 8031CC70 003188D0  41 82 01 08 */	beq lbl_8031CD78
/* 8031CC74 003188D4  48 00 01 A4 */	b lbl_8031CE18
lbl_8031CC78:
/* 8031CC78 003188D8  3C 00 00 04 */	lis r0, 4
/* 8031CC7C 003188DC  7C 03 00 00 */	cmpw r3, r0
/* 8031CC80 003188E0  41 82 01 28 */	beq lbl_8031CDA8
/* 8031CC84 003188E4  48 00 01 94 */	b lbl_8031CE18
lbl_8031CC88:
/* 8031CC88 003188E8  3C 00 08 00 */	lis r0, 0x800
/* 8031CC8C 003188EC  7C 03 00 00 */	cmpw r3, r0
/* 8031CC90 003188F0  41 82 01 58 */	beq lbl_8031CDE8
/* 8031CC94 003188F4  40 80 00 24 */	bge lbl_8031CCB8
/* 8031CC98 003188F8  3C 00 04 00 */	lis r0, 0x400
/* 8031CC9C 003188FC  7C 03 00 00 */	cmpw r3, r0
/* 8031CCA0 00318900  41 82 01 38 */	beq lbl_8031CDD8
/* 8031CCA4 00318904  40 80 01 74 */	bge lbl_8031CE18
/* 8031CCA8 00318908  3C 00 02 00 */	lis r0, 0x200
/* 8031CCAC 0031890C  7C 03 00 00 */	cmpw r3, r0
/* 8031CCB0 00318910  41 82 01 18 */	beq lbl_8031CDC8
/* 8031CCB4 00318914  48 00 01 64 */	b lbl_8031CE18
lbl_8031CCB8:
/* 8031CCB8 00318918  3C 00 10 00 */	lis r0, 0x1000
/* 8031CCBC 0031891C  7C 03 00 00 */	cmpw r3, r0
/* 8031CCC0 00318920  41 82 01 38 */	beq lbl_8031CDF8
/* 8031CCC4 00318924  48 00 01 54 */	b lbl_8031CE18
lbl_8031CCC8:
/* 8031CCC8 00318928  38 6B 00 00 */	addi r3, r11, 0
/* 8031CCCC 0031892C  4C C6 31 82 */	crclr 6
/* 8031CCD0 00318930  4B EA FB 95 */	bl printf
/* 8031CCD4 00318934  48 00 01 50 */	b lbl_8031CE24
lbl_8031CCD8:
/* 8031CCD8 00318938  38 6B 00 10 */	addi r3, r11, 0x10
/* 8031CCDC 0031893C  4C C6 31 82 */	crclr 6
/* 8031CCE0 00318940  4B EA FB 85 */	bl printf
/* 8031CCE4 00318944  48 00 01 40 */	b lbl_8031CE24
lbl_8031CCE8:
/* 8031CCE8 00318948  38 6B 00 20 */	addi r3, r11, 0x20
/* 8031CCEC 0031894C  4C C6 31 82 */	crclr 6
/* 8031CCF0 00318950  4B EA FB 75 */	bl printf
/* 8031CCF4 00318954  48 00 01 30 */	b lbl_8031CE24
lbl_8031CCF8:
/* 8031CCF8 00318958  38 6B 00 30 */	addi r3, r11, 0x30
/* 8031CCFC 0031895C  4C C6 31 82 */	crclr 6
/* 8031CD00 00318960  4B EA FB 65 */	bl printf
/* 8031CD04 00318964  48 00 01 20 */	b lbl_8031CE24
lbl_8031CD08:
/* 8031CD08 00318968  38 6B 00 40 */	addi r3, r11, 0x40
/* 8031CD0C 0031896C  4C C6 31 82 */	crclr 6
/* 8031CD10 00318970  4B EA FB 55 */	bl printf
/* 8031CD14 00318974  48 00 01 10 */	b lbl_8031CE24
lbl_8031CD18:
/* 8031CD18 00318978  38 6B 00 50 */	addi r3, r11, 0x50
/* 8031CD1C 0031897C  4C C6 31 82 */	crclr 6
/* 8031CD20 00318980  4B EA FB 45 */	bl printf
/* 8031CD24 00318984  48 00 01 00 */	b lbl_8031CE24
lbl_8031CD28:
/* 8031CD28 00318988  38 6B 00 60 */	addi r3, r11, 0x60
/* 8031CD2C 0031898C  4C C6 31 82 */	crclr 6
/* 8031CD30 00318990  4B EA FB 35 */	bl printf
/* 8031CD34 00318994  48 00 00 F0 */	b lbl_8031CE24
lbl_8031CD38:
/* 8031CD38 00318998  38 6B 00 70 */	addi r3, r11, 0x70
/* 8031CD3C 0031899C  4C C6 31 82 */	crclr 6
/* 8031CD40 003189A0  4B EA FB 25 */	bl printf
/* 8031CD44 003189A4  48 00 00 E0 */	b lbl_8031CE24
lbl_8031CD48:
/* 8031CD48 003189A8  38 6B 00 80 */	addi r3, r11, 0x80
/* 8031CD4C 003189AC  4C C6 31 82 */	crclr 6
/* 8031CD50 003189B0  4B EA FB 15 */	bl printf
/* 8031CD54 003189B4  48 00 00 D0 */	b lbl_8031CE24
lbl_8031CD58:
/* 8031CD58 003189B8  38 6B 00 90 */	addi r3, r11, 0x90
/* 8031CD5C 003189BC  4C C6 31 82 */	crclr 6
/* 8031CD60 003189C0  4B EA FB 05 */	bl printf
/* 8031CD64 003189C4  48 00 00 C0 */	b lbl_8031CE24
lbl_8031CD68:
/* 8031CD68 003189C8  38 6B 00 A0 */	addi r3, r11, 0xa0
/* 8031CD6C 003189CC  4C C6 31 82 */	crclr 6
/* 8031CD70 003189D0  4B EA FA F5 */	bl printf
/* 8031CD74 003189D4  48 00 00 B0 */	b lbl_8031CE24
lbl_8031CD78:
/* 8031CD78 003189D8  38 6B 00 B0 */	addi r3, r11, 0xb0
/* 8031CD7C 003189DC  4C C6 31 82 */	crclr 6
/* 8031CD80 003189E0  4B EA FA E5 */	bl printf
/* 8031CD84 003189E4  48 00 00 A0 */	b lbl_8031CE24
lbl_8031CD88:
/* 8031CD88 003189E8  38 6B 00 C0 */	addi r3, r11, 0xc0
/* 8031CD8C 003189EC  4C C6 31 82 */	crclr 6
/* 8031CD90 003189F0  4B EA FA D5 */	bl printf
/* 8031CD94 003189F4  48 00 00 90 */	b lbl_8031CE24
lbl_8031CD98:
/* 8031CD98 003189F8  38 6B 00 D0 */	addi r3, r11, 0xd0
/* 8031CD9C 003189FC  4C C6 31 82 */	crclr 6
/* 8031CDA0 00318A00  4B EA FA C5 */	bl printf
/* 8031CDA4 00318A04  48 00 00 80 */	b lbl_8031CE24
lbl_8031CDA8:
/* 8031CDA8 00318A08  38 6B 00 E0 */	addi r3, r11, 0xe0
/* 8031CDAC 00318A0C  4C C6 31 82 */	crclr 6
/* 8031CDB0 00318A10  4B EA FA B5 */	bl printf
/* 8031CDB4 00318A14  48 00 00 70 */	b lbl_8031CE24
lbl_8031CDB8:
/* 8031CDB8 00318A18  38 6B 00 F4 */	addi r3, r11, 0xf4
/* 8031CDBC 00318A1C  4C C6 31 82 */	crclr 6
/* 8031CDC0 00318A20  4B EA FA A5 */	bl printf
/* 8031CDC4 00318A24  48 00 00 60 */	b lbl_8031CE24
lbl_8031CDC8:
/* 8031CDC8 00318A28  38 6B 01 04 */	addi r3, r11, 0x104
/* 8031CDCC 00318A2C  4C C6 31 82 */	crclr 6
/* 8031CDD0 00318A30  4B EA FA 95 */	bl printf
/* 8031CDD4 00318A34  48 00 00 50 */	b lbl_8031CE24
lbl_8031CDD8:
/* 8031CDD8 00318A38  38 6B 01 14 */	addi r3, r11, 0x114
/* 8031CDDC 00318A3C  4C C6 31 82 */	crclr 6
/* 8031CDE0 00318A40  4B EA FA 85 */	bl printf
/* 8031CDE4 00318A44  48 00 00 40 */	b lbl_8031CE24
lbl_8031CDE8:
/* 8031CDE8 00318A48  38 6B 01 24 */	addi r3, r11, 0x124
/* 8031CDEC 00318A4C  4C C6 31 82 */	crclr 6
/* 8031CDF0 00318A50  4B EA FA 75 */	bl printf
/* 8031CDF4 00318A54  48 00 00 30 */	b lbl_8031CE24
lbl_8031CDF8:
/* 8031CDF8 00318A58  38 6B 01 34 */	addi r3, r11, 0x134
/* 8031CDFC 00318A5C  4C C6 31 82 */	crclr 6
/* 8031CE00 00318A60  4B EA FA 65 */	bl printf
/* 8031CE04 00318A64  48 00 00 20 */	b lbl_8031CE24
lbl_8031CE08:
/* 8031CE08 00318A68  38 6B 01 44 */	addi r3, r11, 0x144
/* 8031CE0C 00318A6C  4C C6 31 82 */	crclr 6
/* 8031CE10 00318A70  4B EA FA 55 */	bl printf
/* 8031CE14 00318A74  48 00 00 10 */	b lbl_8031CE24
lbl_8031CE18:
/* 8031CE18 00318A78  38 6B 01 54 */	addi r3, r11, 0x154
/* 8031CE1C 00318A7C  4C C6 31 82 */	crclr 6
/* 8031CE20 00318A80  4B EA FA 45 */	bl printf
lbl_8031CE24:
/* 8031CE24 00318A84  38 A1 00 88 */	addi r5, r1, 0x88
/* 8031CE28 00318A88  38 01 00 08 */	addi r0, r1, 8
/* 8031CE2C 00318A8C  3C 60 02 00 */	lis r3, 0x200
/* 8031CE30 00318A90  90 A1 00 6C */	stw r5, 0x6c(r1)
/* 8031CE34 00318A94  38 81 00 68 */	addi r4, r1, 0x68
/* 8031CE38 00318A98  90 61 00 68 */	stw r3, 0x68(r1)
/* 8031CE3C 00318A9C  7F E3 FB 78 */	mr r3, r31
/* 8031CE40 00318AA0  90 01 00 70 */	stw r0, 0x70(r1)
/* 8031CE44 00318AA4  4B EA FA E9 */	bl vprintf
lbl_8031CE48:
/* 8031CE48 00318AA8  80 01 00 84 */	lwz r0, 0x84(r1)
/* 8031CE4C 00318AAC  83 E1 00 7C */	lwz r31, 0x7c(r1)
/* 8031CE50 00318AB0  7C 08 03 A6 */	mtlr r0
/* 8031CE54 00318AB4  38 21 00 80 */	addi r1, r1, 0x80
/* 8031CE58 00318AB8  4E 80 00 20 */	blr