summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2012-12-22 21:07:51 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2012-12-22 21:07:51 +0000
commit2b3c5a4235f188e9442c6926d8cc97797ab610df (patch)
treec36e87fd2c86149125fe98c3511ac13a3c84bea0 /lib
parent4af5c6be548fdfa84e9a78ac3d20bf7d3a8897bc (diff)
Make sure the stack is 16-byte aligned otherwise the use of certain SSE
instructions will fail. ok guenther@
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/arch/i386/sys/tfork_thread.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/arch/i386/sys/tfork_thread.S b/lib/libc/arch/i386/sys/tfork_thread.S
index ee82d061265..119cc0d3db3 100644
--- a/lib/libc/arch/i386/sys/tfork_thread.S
+++ b/lib/libc/arch/i386/sys/tfork_thread.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: tfork_thread.S,v 1.4 2012/08/22 17:19:34 pascal Exp $ */
+/* $OpenBSD: tfork_thread.S,v 1.5 2012/12/22 21:07:50 kettenis Exp $ */
/*-
* Copyright (c) 2000 Peter Wemm <peter@FreeBSD.org>
* All rights reserved.
@@ -88,6 +88,9 @@ ENTRY(__tfork_thread)
*/
1:
xorl %ebp, %ebp # mark outermost frame
+ subl $4, %esp # align stack
+ andl $~15, %esp
+ addl $4, %esp
pushl %edi # push start argument
call *%esi
addl $4, %esp