[LLVMdev] RFA: Problem with Exceptions

Duncan Sands baldrick at free.fr
Fri Aug 31 01:52:44 PDT 2007


Hi Dale,

> The most obvious thing different is that gcc expects the return value  
> of the
> throw (EDX) to be 1, while llvm expects it to be 2.  Try changing the  
> cmp to 2
> at line 46 to cmp against 1 instead and see if that works.

that's because in order to have correct invoke semantics (always branch
to the unwind label whatever exception is unwound) we synthesize a
catch-all after the catch-an-int.  This displaces the index of the
catch-an-int from 1 to 2, i.e. the code is correct.

Ciao,

Duncan.



More information about the llvm-dev mailing list