[LLVMdev] ARM EABI Exceptions

Renato Golin renato.golin at arm.com
Wed May 19 09:49:50 PDT 2010


Hi Jim,


> -----Original Message-----
> It's likely there will be some work to get DWARF EH working for ARM.

Tell me about it! ;)


> That said, keep in mind that the goal is to get the code to conform to
> the ABI, not to produce code and tables that look the same as what GCC
> produces.

Absolutely. I'm only trying to get exception handling working on ARM. Right
now, I'm linking with eabi-gcc, and because clang's table is similar, I
thought I could adapt it. Unfortunately, the testability is nil and the end
goal is not good, so the task is probably not worth it.


> The former is reasonable, the latter is going to feel like
> tilting at windmills, as the internal EH representations in gcc are
> very different than what llvm IR represents. GCC uses a side-table of
> EH "regions" that it references to determine call sites and such, for
> example. LLVM doesn't have that concept and uses the invoke instruction
> instead. One result of this is that the tables that come out often look
> quite different.

As I gathered, the invoke calls were populating the call site table, similar
to the .LEH regions GCC does, and the call site table of both look quite
similar, to me. I noticed more differences around the call table, for
instance, the headers, the type info actions and the relocation information.

Also, the normal flow (try/catch blocks, with cleanup regions and intrinsic
calls) didn't seem that different.


> So long as they adhere to the spec, though, the code
> will interoperate correctly.

The spec is quite vague when expressing the personality routines, AFAICT.

If the tables are different, when you link code compiled with Clang and GCC,
both using the same personality routine (GCC's or Clang's, but not both),
how do you expect them to work together?

Nevertheless, I digress. I may have started it the wrong way, but my
immediate goal is to compile a simple exception example to ARM. Do you know
a better path?

Cheers,
--renato






More information about the llvm-dev mailing list