From f6aee98e0ffaf05634e436ada8e93469f31d0752 Mon Sep 17 00:00:00 2001 From: gavan Date: Wed, 19 Nov 2003 00:11:55 +0000 Subject: [PATCH] Save arguments passed into scratch registers, rather than scratch registers into arguments passed. Avoids corruption of anything pointed to by r3 and r4 on entry to os_get_env, and allows pass-by-reference values to be returned. --- sys/arch/acorn32/stand/lib/riscoscalls.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arch/acorn32/stand/lib/riscoscalls.S b/sys/arch/acorn32/stand/lib/riscoscalls.S index a542909fbfc3..968ba30bda54 100644 --- a/sys/arch/acorn32/stand/lib/riscoscalls.S +++ b/sys/arch/acorn32/stand/lib/riscoscalls.S @@ -1,4 +1,4 @@ -/* $NetBSD: riscoscalls.S,v 1.1 2002/12/28 23:57:38 reinoud Exp $ */ +/* $NetBSD: riscoscalls.S,v 1.2 2003/11/19 00:11:55 gavan Exp $ */ /*- * Copyright (c) 2001 Ben Harris @@ -162,8 +162,8 @@ ENTRY(os_get_env) mov ip, sp stmfd sp!, {r4, fp, ip, lr, pc} sub fp, ip, #4 - mov r0, r3 - mov r1, r4 + mov r3, r0 + mov r4, r1 swi OS_GetEnv teq r3, #0 strne r1, [r3]