summaryrefslogtreecommitdiff
path: root/lib/csu/mips64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2010-09-12 12:13:52 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2010-09-12 12:13:52 +0000
commitc9a1ce0e493d60f11e645f8e2baca778a40ecae9 (patch)
treeb2209d4b493a9a230fbc2cf92d6b8f73c672338f /lib/csu/mips64
parenta4d084700b32658320ab400deb8bad0fe02c89e1 (diff)
Since the stack layout changes from gcc3 to gcc4, change the inline asm to
deal with this. ok miod@
Diffstat (limited to 'lib/csu/mips64')
-rw-r--r--lib/csu/mips64/crt0.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/csu/mips64/crt0.c b/lib/csu/mips64/crt0.c
index a8d2e6f84f2..409227b122a 100644
--- a/lib/csu/mips64/crt0.c
+++ b/lib/csu/mips64/crt0.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crt0.c,v 1.5 2009/12/10 05:46:29 miod Exp $ */
+/* $OpenBSD: crt0.c,v 1.6 2010/09/12 12:13:51 kettenis Exp $ */
/* $NetBSD: crt0.c,v 1.7 1995/06/03 13:16:15 pk Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -83,8 +83,12 @@ __start()
asm(" dla $28,_gp");
asm(" daddiu %0,$29,32" : "=r" (kfp));
#else
+#if defined(__GNUC__) && __GNUC__ > 3
+ asm(" daddiu %0,$29,64" : "=r" (kfp));
+#else
asm(" daddiu %0,$29,80" : "=r" (kfp));
#endif
+#endif
/* just above the saved frame pointer
kfp = (struct kframe *) (&param-1);*/
argv = &kfp->kargv[0];