Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup s assembly files #733

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions common/sbus/src/ee_low.S

This file was deleted.

58 changes: 58 additions & 0 deletions common/sbus/src/ee_low.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

__asm__
(
"\t" ".global WriteBackDCache" "\n"
"\t" ".ent WriteBackDCache" "\n"
"\t" "WriteBackDCache:" "\n"

"\t" "\t" "lui $25, 0xffff" "\n"
"\t" "\t" "ori $25, $25, 0xffc0" "\n"
"\t" "\t" "blez $5, last" "\n"
"\t" "\t" "addu $10, $4, $5" "\n"
"\t" "\t" "and $8, $4, $25" "\n"
"\t" "\t" "addiu $10, $10, -1" "\n"
"\t" "\t" "and $9, $10, $25" "\n"
"\t" "\t" "subu $10, $9, $8" "\n"
"\t" "\t" "srl $11, $10, 0x6" "\n"
"\t" "\t" "addiu $11, $11, 1" "\n"
"\t" "\t" "andi $9, $11, 0x7" "\n"
"\t" "\t" "beqz $9, eight" "\n"
"\t" "\t" "srl $10, $11, 0x3" "\n"
"\t" "loop1:" "\n"
"\t" "\t" "sync" "\n"
"\t" "\t" "cache 0x18, 0($8)" "\n"
"\t" "\t" "sync" "\n"
"\t" "\t" "addiu $9, $9, -1" "\n"
"\t" "\t" "nop" "\n"
"\t" "\t" "bgtz $9, loop1" "\n"
"\t" "\t" "addiu $8, $8, 64" "\n"

"\t" "eight:" "\n"
"\t" "\t" "beqz $10, last" "\n"
"\t" "loop8:" "\n"
"\t" "\t" "addiu $10, $10, -1" "\n"
"\t" "\t" "sync" "\n"
"\t" "\t" "cache 0x18, 0($8)" "\n"
"\t" "\t" "sync" "\n"
"\t" "\t" "cache 0x18, 64($8)" "\n"
"\t" "\t" "sync" "\n"
"\t" "\t" "cache 0x18, 128($8)" "\n"
"\t" "\t" "sync" "\n"
"\t" "\t" "cache 0x18, 192($8)" "\n"
"\t" "\t" "sync" "\n"
"\t" "\t" "cache 0x18, 256($8)" "\n"
"\t" "\t" "sync" "\n"
"\t" "\t" "cache 0x18, 320($8)" "\n"
"\t" "\t" "sync" "\n"
"\t" "\t" "cache 0x18, 384($8)" "\n"
"\t" "\t" "sync" "\n"
"\t" "\t" "cache 0x18, 448($8)" "\n"
"\t" "\t" "sync" "\n"
"\t" "\t" "bgtz $10, loop8" "\n"
"\t" "\t" "addiu $8, $8, 512" "\n"
"\t" "last:" "\n"
"\t" "\t" "jr $31" "\n"
"\t" "\t" "nop" "\n"

"\t" ".end WriteBackDCache" "\n"
);
34 changes: 20 additions & 14 deletions ee/debug/src/callstackget.S → ee/debug/src/callstackget.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,24 @@ in this Software without prior written authorization from the X Consortium.
* Author: Keith Packard, MIT X Consortium
*/

.globl ps2GetReturnAddress
.ent ps2GetReturnAddress
ps2GetReturnAddress:
.frame $sp, 0, $31
move $2,$31
j $31
.end ps2GetReturnAddress
__asm__
(
"\t" "\t" ".globl ps2GetReturnAddress" "\n"
"\t" "\t" ".ent ps2GetReturnAddress" "\n"
"\t" "ps2GetReturnAddress:" "\n"
"\t" "\t" ".frame $sp, 0, $31" "\n"
"\t" "\t" "move $2,$31" "\n"
"\t" "\t" "j $31" "\n"
"\t" "\t" ".end ps2GetReturnAddress" "\n"
);

.globl ps2GetStackPointer
.ent ps2GetStackPointer
ps2GetStackPointer:
.frame $sp, 0, $31
move $2,$29
j $31
.end ps2GetStackPointer
__asm__
(
"\t" "\t" ".globl ps2GetStackPointer" "\n"
"\t" "\t" ".ent ps2GetStackPointer" "\n"
"\t" "ps2GetStackPointer:" "\n"
"\t" "\t" ".frame $sp, 0, $31" "\n"
"\t" "\t" "move $2,$29" "\n"
"\t" "\t" "j $31" "\n"
"\t" "\t" ".end ps2GetStackPointer" "\n"
);
Loading
Loading