This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [m68k] Fix and improve ColdFire function prologue/epilogue generation (respin)
Bernardo Innocenti <bernie@develer.com> writes:
> Another odd thing about EH problems. The m68k backend defines this
> macro:
>
> /* Describe how we implement __builtin_eh_return. */
> #define EH_RETURN_DATA_REGNO(N) \
> ((N) < 2 ? (N) : INVALID_REGNUM)
>
>
> But docs I've read explicitly say that it must _NOT_ use scratch
> registers:
>
> ** EH_RETURN_DATA_REGNO(N) **
>
> The new implementation of the EH uses two registers to pass
> information back to catch. The macro EH_RETURN_DATA_REGNO maps
> the values to hard registers. These registers require stack slots, so
> they cannot be scratch registers that are not saved across function
> calls. The macro EH_RETURN_DATA_REGNO will need to be defined and
> return appropriate register numbers for the values 0 and 1. Below is
> an example:
I believe this can be made to work; for instance, rs6000 uses r3
through r6 for this purpose. Maybe the docs are out of date.
--
- Geoffrey Keating <geoffk@geoffk.org>