Skip to content

Commit 447d73c

Browse files
committed
refactor: reformat s files into c files
1 parent 1ebbc2f commit 447d73c

File tree

30 files changed

+3975
-3441
lines changed

30 files changed

+3975
-3441
lines changed

common/sbus/src/ee_low.S

Lines changed: 0 additions & 54 deletions
This file was deleted.

common/sbus/src/ee_low.c

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
2+
__asm__
3+
(
4+
"\t" ".global WriteBackDCache" "\n"
5+
"\t" ".ent WriteBackDCache" "\n"
6+
"\t" "WriteBackDCache:" "\n"
7+
8+
"\t" "\t" "lui $25, 0xffff" "\n"
9+
"\t" "\t" "ori $25, $25, 0xffc0" "\n"
10+
"\t" "\t" "blez $5, last" "\n"
11+
"\t" "\t" "addu $10, $4, $5" "\n"
12+
"\t" "\t" "and $8, $4, $25" "\n"
13+
"\t" "\t" "addiu $10, $10, -1" "\n"
14+
"\t" "\t" "and $9, $10, $25" "\n"
15+
"\t" "\t" "subu $10, $9, $8" "\n"
16+
"\t" "\t" "srl $11, $10, 0x6" "\n"
17+
"\t" "\t" "addiu $11, $11, 1" "\n"
18+
"\t" "\t" "andi $9, $11, 0x7" "\n"
19+
"\t" "\t" "beqz $9, eight" "\n"
20+
"\t" "\t" "srl $10, $11, 0x3" "\n"
21+
"\t" "loop1:" "\n"
22+
"\t" "\t" "sync" "\n"
23+
"\t" "\t" "cache 0x18, 0($8)" "\n"
24+
"\t" "\t" "sync" "\n"
25+
"\t" "\t" "addiu $9, $9, -1" "\n"
26+
"\t" "\t" "nop" "\n"
27+
"\t" "\t" "bgtz $9, loop1" "\n"
28+
"\t" "\t" "addiu $8, $8, 64" "\n"
29+
30+
"\t" "eight:" "\n"
31+
"\t" "\t" "beqz $10, last" "\n"
32+
"\t" "loop8:" "\n"
33+
"\t" "\t" "addiu $10, $10, -1" "\n"
34+
"\t" "\t" "sync" "\n"
35+
"\t" "\t" "cache 0x18, 0($8)" "\n"
36+
"\t" "\t" "sync" "\n"
37+
"\t" "\t" "cache 0x18, 64($8)" "\n"
38+
"\t" "\t" "sync" "\n"
39+
"\t" "\t" "cache 0x18, 128($8)" "\n"
40+
"\t" "\t" "sync" "\n"
41+
"\t" "\t" "cache 0x18, 192($8)" "\n"
42+
"\t" "\t" "sync" "\n"
43+
"\t" "\t" "cache 0x18, 256($8)" "\n"
44+
"\t" "\t" "sync" "\n"
45+
"\t" "\t" "cache 0x18, 320($8)" "\n"
46+
"\t" "\t" "sync" "\n"
47+
"\t" "\t" "cache 0x18, 384($8)" "\n"
48+
"\t" "\t" "sync" "\n"
49+
"\t" "\t" "cache 0x18, 448($8)" "\n"
50+
"\t" "\t" "sync" "\n"
51+
"\t" "\t" "bgtz $10, loop8" "\n"
52+
"\t" "\t" "addiu $8, $8, 512" "\n"
53+
"\t" "last:" "\n"
54+
"\t" "\t" "jr $31" "\n"
55+
"\t" "\t" "nop" "\n"
56+
57+
"\t" ".end WriteBackDCache" "\n"
58+
);

ee/debug/src/callstackget.S renamed to ee/debug/src/callstackget.c

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,24 @@ in this Software without prior written authorization from the X Consortium.
2929
* Author: Keith Packard, MIT X Consortium
3030
*/
3131

32-
.globl ps2GetReturnAddress
33-
.ent ps2GetReturnAddress
34-
ps2GetReturnAddress:
35-
.frame $sp, 0, $31
36-
move $2,$31
37-
j $31
38-
.end ps2GetReturnAddress
32+
__asm__
33+
(
34+
"\t" "\t" ".globl ps2GetReturnAddress" "\n"
35+
"\t" "\t" ".ent ps2GetReturnAddress" "\n"
36+
"\t" "ps2GetReturnAddress:" "\n"
37+
"\t" "\t" ".frame $sp, 0, $31" "\n"
38+
"\t" "\t" "move $2,$31" "\n"
39+
"\t" "\t" "j $31" "\n"
40+
"\t" "\t" ".end ps2GetReturnAddress" "\n"
41+
);
3942

40-
.globl ps2GetStackPointer
41-
.ent ps2GetStackPointer
42-
ps2GetStackPointer:
43-
.frame $sp, 0, $31
44-
move $2,$29
45-
j $31
46-
.end ps2GetStackPointer
43+
__asm__
44+
(
45+
"\t" "\t" ".globl ps2GetStackPointer" "\n"
46+
"\t" "\t" ".ent ps2GetStackPointer" "\n"
47+
"\t" "ps2GetStackPointer:" "\n"
48+
"\t" "\t" ".frame $sp, 0, $31" "\n"
49+
"\t" "\t" "move $2,$29" "\n"
50+
"\t" "\t" "j $31" "\n"
51+
"\t" "\t" ".end ps2GetStackPointer" "\n"
52+
);

0 commit comments

Comments
 (0)