Source-Changes-HG archive

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

[src/trunk]: src/lib/csu/arch/sh3 Asm cosmetic. Add a comment that explains ...



details:   https://anonhg.NetBSD.org/src/rev/bc899c12654a
branches:  trunk
changeset: 773122:bc899c12654a
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sat Jan 28 12:21:13 2012 +0000

description:
Asm cosmetic.  Add a comment that explains what this trampoline does.

diffstat:

 lib/csu/arch/sh3/crt0.S |  16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r ac30c3c79e6f -r bc899c12654a lib/csu/arch/sh3/crt0.S
--- a/lib/csu/arch/sh3/crt0.S   Sat Jan 28 12:15:19 2012 +0000
+++ b/lib/csu/arch/sh3/crt0.S   Sat Jan 28 12:21:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.S,v 1.1 2010/08/07 18:01:34 joerg Exp $ */
+/* $NetBSD: crt0.S,v 1.2 2012/01/28 12:21:13 uwe Exp $ */
 
 /*
  * Copyright (c) 1998 Christos Zoulas
@@ -37,11 +37,17 @@
 
 #include <machine/asm.h>
 
-RCSID("$NetBSD: crt0.S,v 1.1 2010/08/07 18:01:34 joerg Exp $")
+RCSID("$NetBSD: crt0.S,v 1.2 2012/01/28 12:21:13 uwe Exp $")
 
 STRONG_ALIAS(_start,__start)
 
+/*
+ * Kernel setregs() passes all arguments in registers to avoid
+ * copyout.  This trampoline pushes 5th and 6th arguments into stack,
+ * where C ABI expects them to be, and calls the real startup code
+ * written in C.
+ */
 _ENTRY(__start)
-       mov.l   r9,@-r15
-       bra ___start
-       mov.l   r8,@-r15
+       mov.l   r9, @-sp
+       bra     ___start
+        mov.l  r8, @-sp



Home | Main Index | Thread Index | Old Index