[LLVMdev] exception handling broken on x86-64?

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


Hello, Thomas

> > I'd suggest to start with filling necessary bits in the
> > X86RegisterInfo.cpp. This includes frame moves information and
> > description of stack layout. 
> I looked at X86RegisterInfo.cpp, but I think that it already supports
> x86-64. At least there were no obvious places were the code would only
> work for 32bit mode.
Right. See my last e-mail to Dale. It's really amazing :)

> After comparing the generated assembler code with native gcc code I
> think the generated code is fine, just the exception handler info in
> the non-code sections is broken/missing.
It seems, that EH dwarf information emission is disabled in
X86TargetAsmInfo.cpp. Remove the is64Bit() condition near
"SupportExceptionHandling = true" line in X86Subtarget::isELF section.

Also, don't forget to add --enable-eh switch to llc invocation.

You will need to link .S with your native unwinding runtime (so, use g++
to link, not llvm-g++)

--
WBR, Anton Korobeynikov 



More information about the llvm-dev mailing list