mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
start: Simplify mips and mips64 startup code.
Switches from using r1 as a temporary to r2. That way, we don't have to set the `noat` assembler option. (r1 is the scratch register used by the assembler's pseudoinstructions; the assembler warns when code uses that register explicitly without `noat` set.)
This commit is contained in:
parent
47c0464e86
commit
5478b0eb38
1 changed files with 2 additions and 10 deletions
|
|
@ -332,22 +332,14 @@ fn _start() callconv(.Naked) noreturn {
|
|||
\\ move $fp, $0
|
||||
\\ move $ra, $0
|
||||
\\ move $a0, $sp
|
||||
\\ .set push
|
||||
\\ .set noat
|
||||
\\ addiu $1, $zero, -16
|
||||
\\ and $sp, $sp, $1
|
||||
\\ .set pop
|
||||
\\ and $sp, -16
|
||||
\\ j %[posixCallMainAndExit]
|
||||
,
|
||||
.mips64, .mips64el =>
|
||||
\\ move $fp, $0
|
||||
\\ move $ra, $0
|
||||
\\ move $a0, $sp
|
||||
\\ .set push
|
||||
\\ .set noat
|
||||
\\ daddiu $1, $zero, -16
|
||||
\\ and $sp, $sp, $1
|
||||
\\ .set pop
|
||||
\\ and $sp, -16
|
||||
\\ j %[posixCallMainAndExit]
|
||||
,
|
||||
.powerpc, .powerpcle =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue