From 5478b0eb3821df4fcdbcb221441e732576be7d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 24 Jul 2024 18:35:20 +0200 Subject: [PATCH] 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.) --- lib/std/start.zig | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/std/start.zig b/lib/std/start.zig index b53f2258e1..c3e5d06878 100644 --- a/lib/std/start.zig +++ b/lib/std/start.zig @@ -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 =>