| ... | ... | @@ -293,6 +293,7 @@ fn _start() callconv(.Naked) noreturn { |
| 293 | 293 | \\ .gpword . |
| 294 | 294 | \\ .gpword %[posixCallMainAndExit] |
| 295 | 295 | \\ 1: |
| 296 | // The `gp` register on MIPS serves a similar purpose to `r2` (ToC pointer) on PPC64. |
| 296 | 297 | \\ lw $gp, 0($ra) |
| 297 | 298 | \\ subu $gp, $ra, $gp |
| 298 | 299 | \\ lw $25, 4($ra) |
| ... | ... | @@ -314,8 +315,6 @@ fn _start() callconv(.Naked) noreturn { |
| 314 | 315 | \\ .gpdword %[posixCallMainAndExit] |
| 315 | 316 | \\ 1: |
| 316 | 317 | // The `gp` register on MIPS serves a similar purpose to `r2` (ToC pointer) on PPC64. |
| 317 | | // We need to set it up in order for dynamically-linked / position-independent code to |
| 318 | | // work. |
| 319 | 318 | \\ ld $gp, 0($ra) |
| 320 | 319 | \\ dsubu $gp, $ra, $gp |
| 321 | 320 | \\ ld $25, 8($ra) |