1*4fb740b8Snathanw/* $NetBSD: fork.S,v 1.5 2003/02/13 02:50:48 nathanw Exp $ */ 2e4f5181dScgd 3e4f5181dScgd/* 4e4f5181dScgd * Copyright (c) 1994, 1995 Carnegie-Mellon University. 5e4f5181dScgd * All rights reserved. 6e4f5181dScgd * 7e4f5181dScgd * Author: Chris G. Demetriou 8e4f5181dScgd * 9e4f5181dScgd * Permission to use, copy, modify and distribute this software and 10e4f5181dScgd * its documentation is hereby granted, provided that both the copyright 11e4f5181dScgd * notice and this permission notice appear in all copies of the 12e4f5181dScgd * software, derivative works or modified versions, and any portions 13e4f5181dScgd * thereof, and that both notices appear in supporting documentation. 14e4f5181dScgd * 15e4f5181dScgd * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 16e4f5181dScgd * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 17e4f5181dScgd * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 18e4f5181dScgd * 19e4f5181dScgd * Carnegie Mellon requests users of this software to return to 20e4f5181dScgd * 21e4f5181dScgd * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 22e4f5181dScgd * School of Computer Science 23e4f5181dScgd * Carnegie Mellon University 24e4f5181dScgd * Pittsburgh PA 15213-3890 25e4f5181dScgd * 26e4f5181dScgd * any improvements or extensions that they make and grant Carnegie the 27e4f5181dScgd * rights to redistribute these changes. 28e4f5181dScgd */ 29e4f5181dScgd 30e4f5181dScgd#include "SYS.h" 31e4f5181dScgd 32*4fb740b8SnathanwLEAF(__fork, 0) 33b8a4d7adSkleink CALLSYS_ERROR(fork) 34e4f5181dScgd cmovne a4, zero, v0 /* a4 (rv[1]) != 0, child */ 35e4f5181dScgd RET 36*4fb740b8SnathanwEND(__fork) 37