From b722bfb186c0bf9e1d89bd5b9de0ec60593817ea Mon Sep 17 00:00:00 2001 From: scw Date: Fri, 20 Jul 2001 17:08:18 +0000 Subject: [PATCH] Compensate for the syscall args stack cleanup in the clone. (Pointed out by Matthias Pfaller) --- lib/libc/arch/m68k/sys/__clone.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libc/arch/m68k/sys/__clone.S b/lib/libc/arch/m68k/sys/__clone.S index 44c01bb7198d..49eb8319f854 100644 --- a/lib/libc/arch/m68k/sys/__clone.S +++ b/lib/libc/arch/m68k/sys/__clone.S @@ -1,4 +1,4 @@ -/* $NetBSD: __clone.S,v 1.1 2001/07/19 21:50:46 scw Exp $ */ +/* $NetBSD: __clone.S,v 1.2 2001/07/20 17:08:18 scw Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -54,6 +54,7 @@ ENTRY(__clone) jeq 2f /* Yup, bomb out */ movl %d0,%a0 movl %sp@(16),%a0@- /* Push clone's `arg' on its new stack */ + lea %a0@(-12),%a0 /* Fake syscall args for the clone */ movl %a0,%sp@- /* Syscall arg: stack */ movl %sp@(16),%sp@- /* Syscall arg: flags */ clrl %sp@- /* Fake return address */