[Linux-ia64] Re: [patch] 2.4.18-ia64-020226 generalize exception recovery

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2002-03-14 14:13:44
>>>>> On Thu, 14 Mar 2002 13:43:19 +1100, Keith Owens <kaos@sgi.com> said:

  Keith> +#ifdef GAS_HAS_LOCAL_TAGS
  Keith> +#define HANDLE_EXCEPTION_1(regs) search_exception_table(regs->cr_iip + ia64_psr(regs)->ri);
  Keith> +#else
  Keith> +#define HANDLE_EXCEPTION_1(regs) search_exception_table(regs->cr_iip);
  Keith> +#endif
  Keith> +#define HANDLE_EXCEPTION(regs)			\
  Keith> +{						\
  Keith> +	struct exception_fixup fix;		\
  Keith> +	fix = HANDLE_EXCEPTION_1(regs);		\
  Keith> +	if (fix.cont) {				\
  Keith> +		handle_exception(regs, fix);	\
  Keith> +		return;				\
  Keith> +	}					\
  Keith> +}

I'm OK with the first macro (rename it to SEARCH_EXCEPTION_TABLE,
though), but the HANDLE_EXCEPTION() macro is ugly: it looks like a
statement, when in fact it's a conditional return.

	--david
Received on Wed Mar 13 19:15:17 2002

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:07 EST