Skip to content

Commit

Permalink
fix(mips): remove volatiles, store $sp
Browse files Browse the repository at this point in the history
  • Loading branch information
SK83RJOSH committed Jan 10, 2024
1 parent 72b8fb4 commit 040dde1
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/unwinder/arch/mips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,6 @@ macro_rules! code {
(save_gp) => {
"
sw $zero, 0x00($sp)
sw $ra, 0x7C($sp)
sw $gp, 0x70($sp)
sw $v0, 0x08($sp)
sw $v1, 0x0C($sp)
sw $a0, 0x10($sp)
sw $a1, 0x14($sp)
sw $a2, 0x18($sp)
Expand All @@ -225,6 +221,9 @@ macro_rules! code {
sw $s7, 0x5C($sp)
sw $t8, 0x60($sp)
sw $t9, 0x64($sp)
sw $sp, 0x6C($sp)
sw $gp, 0x70($sp)
sw $ra, 0x7C($sp)
"
};
(save_fp) => {
Expand Down Expand Up @@ -265,10 +264,6 @@ macro_rules! code {
};
(restore_gp) => {
"
lw $ra, 0x7C($a0)
lw $gp, 0x70($a0)
lw $v0, 0x08($a0)
lw $v1, 0x0C($a0)
lw $a1, 0x14($a0)
lw $a2, 0x18($a0)
lw $a3, 0x1C($a0)
Expand All @@ -290,6 +285,8 @@ macro_rules! code {
lw $s7, 0x5C($a0)
lw $t8, 0x60($a0)
lw $t9, 0x64($a0)
lw $gp, 0x70($a0)
lw $ra, 0x7C($a0)
"
};
(restore_fp) => {
Expand Down

0 comments on commit 040dde1

Please sign in to comment.