summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-12-10 05:46:30 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-12-10 05:46:30 +0000
commit17a11ae71b1a22244694e5000136c59913eead6b (patch)
treea4cc8a2fc766be12ae6617ed2b6f94f7a68428d2 /lib
parent41d8b7f9fe8f87cac74c15c707ac85ba69ebac05 (diff)
Make sure to use 64 bit instructions in the assembly statements (addi -> daddi)
in the prologue; this gives a chance for binaries loaded with their stack over 2GB virtual, to run. Who's your daddi now?
Diffstat (limited to 'lib')
-rw-r--r--lib/csu/mips64/crt0.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/csu/mips64/crt0.c b/lib/csu/mips64/crt0.c
index 9bc9a354e60..a8d2e6f84f2 100644
--- a/lib/csu/mips64/crt0.c
+++ b/lib/csu/mips64/crt0.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crt0.c,v 1.4 2005/08/04 16:33:05 espie Exp $ */
+/* $OpenBSD: crt0.c,v 1.5 2009/12/10 05:46:29 miod Exp $ */
/* $NetBSD: crt0.c,v 1.7 1995/06/03 13:16:15 pk Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -80,14 +80,10 @@ __start()
* Do GP register setup. Differs depending on shared lib stuff or not.
*/
#if defined(_NO_ABICALLS)
- asm(" la $28,_gp");
- asm(" addiu %0,$29,32" : "=r" (kfp));
+ asm(" dla $28,_gp");
+ asm(" daddiu %0,$29,32" : "=r" (kfp));
#else
-#ifdef __LP64__
- asm(" addiu %0,$29,80" : "=r" (kfp));
-#else
- asm(" addiu %0,$29,56" : "=r" (kfp));
-#endif
+ asm(" daddiu %0,$29,80" : "=r" (kfp));
#endif
/* just above the saved frame pointer
kfp = (struct kframe *) (&param-1);*/