From 415dfd9fa4007e879a4f1b613001af32360ddbea Mon Sep 17 00:00:00 2001 From: Lucas Schumacher Date: Sun, 13 Apr 2025 22:47:47 -0400 Subject: [PATCH] Fix mips build --- arch/mips.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips.c b/arch/mips.c index afc3e29..6a94da9 100644 --- a/arch/mips.c +++ b/arch/mips.c @@ -15,13 +15,13 @@ void exit(int8_t status){ intptr_t write(int32_t fd, const void* buf, intptr_t size){ intptr_t n_written = 0; asm ( - "li $a0, 1\n" + "move $a0, %2\n" "move $a1, %0\n" "move $a2, %1\n" "li $v0, 4004\n" "syscall\n" : //TODO: n_written - : "r"(buf), "r"(count) + : "r"(buf), "r"(size), "r"(fd) : "a0", "a1", "a2", "v0" //TODO: temp registers clobbered by syscall should probably also be listed but this fn returns right away so it should be fine? ); return n_written;