aboutsummaryrefslogtreecommitdiff
path: root/lib/std/start.zig
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2024-07-22 12:58:07 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2024-07-22 14:39:55 +0200
commitc53673276be9de837add3a3c4e948b10cdd7e1a6 (patch)
tree808753efa3dfe87df640cfe27edff8b1eacc2369 /lib/std/start.zig
parent1fa5ca24feb7b931fdc5f4ff826048a87922ad10 (diff)
downloadzig-c53673276be9de837add3a3c4e948b10cdd7e1a6.tar.gz
zig-c53673276be9de837add3a3c4e948b10cdd7e1a6.zip
start: Add POSIX loongarch64 startup code.
Diffstat (limited to 'lib/std/start.zig')
-rw-r--r--lib/std/start.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig
index 081e9d44f0..ff524d5d64 100644
--- a/lib/std/start.zig
+++ b/lib/std/start.zig
@@ -300,6 +300,12 @@ fn _start() callconv(.Naked) noreturn {
\\ and sp, #-16
\\ b %[posixCallMainAndExit]
,
+ .loongarch64 =>
+ \\ move $fp, $zero
+ \\ move $a0, $sp
+ \\ bstrins.d $sp, $zero, 3, 0
+ \\ b %[posixCallMainAndExit]
+ ,
.riscv64 =>
\\ li s0, 0
\\ li ra, 0