-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
s8 foo(s8); /* extern */ | ||
|
||
s8 test(s32 arg0) { | ||
s32 sp10; | ||
|
||
sp10 = arg0; | ||
return (s8) (foo((s8) sp10) + 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
glabel test | ||
addiu sp,sp,-0x20 | ||
sw ra,0xc(sp) | ||
sw s0,8(sp) | ||
sw a0,0x10(sp) | ||
lw v0,0x10(sp) | ||
seb a0,v0 | ||
jal foo | ||
nop | ||
seb v0,v0 | ||
addiu v0,v0,1 | ||
seb v0,v0 | ||
seb s0,v0 | ||
move v0,s0 | ||
lw ra,0xc(sp) | ||
lw s0,8(sp) | ||
addiu sp,sp,0x20 | ||
jr ra | ||
nop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
s16 foo(s16); /* extern */ | ||
|
||
s16 test(s32 arg0) { | ||
s32 sp10; | ||
|
||
sp10 = arg0; | ||
return (s16) (foo((s16) sp10) + 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
glabel test | ||
addiu sp,sp,-0x20 | ||
sw ra,0xc(sp) | ||
sw s0,8(sp) | ||
sw a0,0x10(sp) | ||
lw v0,0x10(sp) | ||
seh a0,v0 | ||
jal foo | ||
nop | ||
seh v0,v0 | ||
addiu v0,v0,1 | ||
seh v0,v0 | ||
seh s0,v0 | ||
move v0,s0 | ||
lw ra,0xc(sp) | ||
lw s0,8(sp) | ||
addiu sp,sp,0x20 | ||
jr ra | ||
nop |