Date: Tue, 27 Mar 2001 14:52:45 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: alpha@FreeBSD.org Subject: exception_return broken? Message-ID: <XFMail.010327145245.jhb@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
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 <machine/asm.h>: /* * 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 <jhb@FreeBSD.org> -- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010327145245.jhb>