[LLVMdev] exception handling broken on x86-64?

Anton Korobeynikov asl at math.spbu.ru
Sat Feb 9 11:11:05 PST 2008


Hello, Thomas

> when building the second release candidate of llvm 2.2 I noticed that
> exception handling seems to be broken on Linux x86-64. The exception 
EH never worked on x86-64. Mainly due to absence of intrinsics used in
unwinding runtime. Also, some other important stuff is missed as well
(like stack layout information).

> When compiled with llvm-g++ it aborts after printing "B". The generated
> assembler code looks reasonable at a first glance,
It shouldn't. At least all frame moves information is missing.

> but something must be broken. Any ideas about how to debug this?
I'd suggest to start with filling necessary bits in the
X86RegisterInfo.cpp. This includes frame moves information and
description of stack layout. 

Then you can proceed to x86-64-specific lowering of some important
intrinsics. You can link your code with native g++ in order to use
gcc-provided (and thus working) runtime. 

--
WBR, Anton Korobeynikov 



More information about the llvm-dev mailing list