From owner-freebsd-alpha Tue Mar 27 14:53:17 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 0699B37B718 for ; Tue, 27 Mar 2001 14:53:15 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f2RMr7G67114 for ; Tue, 27 Mar 2001 14:53:07 -0800 (PST) (envelope-from jhb@FreeBSD.org) 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: Tue, 27 Mar 2001 14:52:45 -0800 (PST) From: John Baldwin To: alpha@FreeBSD.org Subject: exception_return broken? Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org While browsing sys/alpha/alpha/exception.s I had a little epiphany that might explain the problems we are seeing with signals. First some quotes from : /* * LEAF * Declare a global leaf function. * A leaf function does not call other functions AND does not * use any register that is callee-saved AND does not modify * the stack pointer. */ ... /* * NESTED * Declare a (global) nested function * A nested function calls other functions and needs * therefore stack space to save/restore registers. */ Now look at exception_return in exception.s: /* * exception_return: return from trap, exception, or syscall */ LEAF(exception_return, 1) /* XXX should be NESTED */ br pv, Ler1 Ler1: LDGP(pv) ... /* Handle any AST's or resched's. */ mov sp, a0 /* only arg is frame */ CALL(ast) Lrestoreregs: /* set the hae register if this process has specified a value */ ldq t0, GD_CURPROC(globalp) beq t0, Lnohae ldq t1, P_MD_FLAGS(t0) and t1, MDP_HAEUSED beq t1, Lnohae ldq a0, P_MD_HAE(t0) ldq pv, chipset + CHIPSET_WRITE_HAE CALL((pv)) I think we should definitely make exception_return NESTED() as the XXX comment indicates, but I'm not sure how to to easily do that, as NESTED() requires a number of arguments for things like the frame size and bitmasks of used registers. -- 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-alpha" in the body of the message