1*2af01421Sskrll/* $NetBSD: fork.S,v 1.5 2020/05/05 06:20:55 skrll Exp $ */ 202ac1ae2Sfredette 302ac1ae2Sfredette/* $OpenBSD: fork.S,v 1.7 2001/06/04 23:14:04 mickey Exp $ */ 402ac1ae2Sfredette 502ac1ae2Sfredette/* 602ac1ae2Sfredette * Copyright (c) 1999 Michael Shalayeff 702ac1ae2Sfredette * All rights reserved. 802ac1ae2Sfredette * 902ac1ae2Sfredette * Redistribution and use in source and binary forms, with or without 1002ac1ae2Sfredette * modification, are permitted provided that the following conditions 1102ac1ae2Sfredette * are met: 1202ac1ae2Sfredette * 1. Redistributions of source code must retain the above copyright 1302ac1ae2Sfredette * notice, this list of conditions and the following disclaimer. 1402ac1ae2Sfredette * 2. Redistributions in binary form must reproduce the above copyright 1502ac1ae2Sfredette * notice, this list of conditions and the following disclaimer in the 1602ac1ae2Sfredette * documentation and/or other materials provided with the distribution. 1702ac1ae2Sfredette * 1802ac1ae2Sfredette * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1902ac1ae2Sfredette * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2002ac1ae2Sfredette * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2102ac1ae2Sfredette * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, 2202ac1ae2Sfredette * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 2302ac1ae2Sfredette * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 2402ac1ae2Sfredette * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2502ac1ae2Sfredette * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 2602ac1ae2Sfredette * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 2702ac1ae2Sfredette * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 2802ac1ae2Sfredette * THE POSSIBILITY OF SUCH DAMAGE. 2902ac1ae2Sfredette */ 3002ac1ae2Sfredette 3102ac1ae2Sfredette#include "SYS.h" 3202ac1ae2Sfredette 3302ac1ae2Sfredette#if defined(LIBC_SCCS) && !defined(lint) 34*2af01421Sskrll RCSID("$NetBSD: fork.S,v 1.5 2020/05/05 06:20:55 skrll Exp $") 3502ac1ae2Sfredette#endif /* LIBC_SCCS and not lint */ 3602ac1ae2Sfredette 374fb740b8SnathanwENTRY(__fork,0) 3802ac1ae2Sfredette SYSCALL(fork) 39ed9d4336Smatt addi -1, %ret1, %ret1 40ed9d4336Smatt bv %r0(%rp) 41ed9d4336Smatt and %ret0, %ret1, %ret0 424fb740b8SnathanwEXIT(__fork) 4302ac1ae2Sfredette 4402ac1ae2Sfredette .end 45