From owner-freebsd-arch Mon Oct 29 2:16:55 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mail12.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by hub.freebsd.org (Postfix) with ESMTP id 5E67337B405 for ; Mon, 29 Oct 2001 02:16:49 -0800 (PST) Received: (qmail 1659 invoked from network); 29 Oct 2001 10:16:48 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 29 Oct 2001 10:16:48 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Mon, 29 Oct 2001 02:16:37 -0800 (PST) From: John Baldwin To: arch@FreeBSD.org Subject: syscall() ABI questions Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've got some questions about td->td_retval[1] and our syscall ABI. On some archs (ia64, alpha) we preinitialie this value to 0. On other archs (i386, sparc64, ppc) we set it to the value of the register it will be set to so that effectively this register's value is preserved across the syscall. My question is do our syscall ABI's actually assume that for syscalls with only one return value that register isn't written to? NetBSD recently changed their i386 syscall code to preinitialize to 0 rather than %edx. Anyone have the history on this? Speaking of i386, I have another question. For the fork, vfork, and rfork syscalls, we have custom handlers that call the syscall normally and then explicitly zero the return value if %edx is 1 (i.e., the child). However, in vm_fork(), we already explicitly set the value in %eax to 0 for child processes, so is this extra setting of that value in libc really needed? If not, we can safely get rid of rfork.S, vfork.S, and fork.S in libc I think. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message