Hi Nathan!

On 9/29/20 7:58 PM, Nathan Sidwell wrote:
> On 9/29/20 11:22 AM, John Paul Adrian Glaubitz wrote:
>>
>> I'm looking for an information regarding exception handling on Linux/m68k, 
>> in particular
>> I need to know what registers are used by the ABI in order to implement the 
>> functions
>> "getExceptionPointerRegister" and "getExceptionSelectorRegister" in the 
>> M680x0 backend
>> in LLVM [1], [2].
> 
> I don;t know what those functions are, but from their names they seem to be 
> related to figuring out the exception object and type?

I think so. I'm not a compiler expert hence my questions :-).

> Do you understand the itanium ABI's unwinding mechanism --
> 1) follow stack to get to landing pad.
> 2) invoke landing pad to see if it wants to catch
> 3) if not, continue following stack
> 4) once we've found one to catch it, we need to unwind properly, which 
> involves invoking cleanups. and eventually getting to the catcher
> 
> invoking the landing pad means passing (a) an integer telling it what's 
> happening, and (b) a pointer to data.

This seems to be the data that I need. I just need to understand how that works.

>> I looked into the GCC source code to find the corresponding parts but I 
>> could only find
>> the macros prefixed with "EH_" [4] which I didn't fully understand.
> 
> Those are the bits you want.  one of those is the selector (0?) and the other 
> is the data pointer (1?).

OK. But aren't they passed through particular registers on m68k? Or is this 
something specific
to LLVM?

Thanks for the help!
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply via email to