Re: Fwd: Re: Registers used for exception handling on Linux/m68k?
On 10/1/20 2:46 PM, Nathan Sidwell wrote:
> Aha! it is EH_RETURN :) and it appears stack adjustment is something different.
>
> for x86, gcc has:
> #define EH_RETURN_DATA_REGNO(N) ((N) <= DX_REG ? (N) : INVALID_REGNUM)
>
> thus N can either be AX_REG or DX_REG. (which is eax/rax and edx/rdx depending on compilation mode)
>
> for m68k gcc has:
> #define EH_RETURN_DATA_REGNO(N) \
> ((N) < 2 ? (N) : INVALID_REGNUM)
>
> so that's registers d0 and d1
>
> I'm guessing EHPersonality:CoreCLR is a different ABI that you're not concerned with.
Yeah, it also seems to be present in the X86 backend only (at least not in the Sparc backend).
> Thus I think you want:
>
> getExceptionPointerRegister to return d0 and getExceptionSelectorRegister to return d1.
>
> give that a go, and see if you can throw/catch exceptions between code compiled by your llvm port and a gcc
Perfect, thanks.
> hope that helps.
I'll give it a try.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Reply to: