Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/acorn32/stand/lib Save arguments passed into scratc...



details:   https://anonhg.NetBSD.org/src/rev/978459bb7229
branches:  trunk
changeset: 555492:978459bb7229
user:      gavan <gavan%NetBSD.org@localhost>
date:      Wed Nov 19 00:11:55 2003 +0000

description:
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.

diffstat:

 sys/arch/acorn32/stand/lib/riscoscalls.S |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r de76ba7acb1b -r 978459bb7229 sys/arch/acorn32/stand/lib/riscoscalls.S
--- a/sys/arch/acorn32/stand/lib/riscoscalls.S  Tue Nov 18 23:21:38 2003 +0000
+++ b/sys/arch/acorn32/stand/lib/riscoscalls.S  Wed Nov 19 00:11:55 2003 +0000
@@ -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 @@
        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]



Home | Main Index | Thread Index | Old Index