From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Jim Wilson Cc: Richard Henderson , egcs@cygnus.com Subject: Re: alpha sjlj exception handling Date: Sat, 08 Nov 1997 21:29:00 -0000 Message-id: <12229.879053491@hurl.cygnus.com> References: <199711072009.MAA10173@cygnus.com> X-SW-Source: 1997-11/msg00308.html In message < 199711072009.MAA10173@cygnus.com >you write: > Where is this supposed to happen in the regular case of non-local goto? > > A function that is the target of a non-local goto will have the global variable > current_function_has_nonlocal_label set. local-alloc/global/reload all know > that if this variable is set, then pseudos whose lifetime crosses a function > call must be handled specially. Correct. This happens in local-alloc.c:find_free_reg /* Don't let a pseudo live in a reg across a function call if we might get a nonlocal goto. */ if (current_function_has_nonlocal_label && qty_n_calls_crossed[qty] > 0) return -1; I assume global & reload have similar checks. I brought up the question about call clobbered regs and their interaction with the EH code and Kenner said it "couldn't happen" and he refused to elaborate why. Note this was with our old unwinder code, not sjlj exceptions. I note that we now set current_function_has_nonlocal_label inside some of our dwarf code for exception handling. So for normal EH this problem has been "solved". However, I doubt it's been fixed for sjlj exceptions; seems to me if you set current_function_has_nonlocal_label for sjlj exceptions then you should be OK. I would think it could be set unconditionally if EH is being used for now -- in the future we might consider turning it off if none of the EH regions are actually used. jeff