Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: endlessroad1991 <at> gmail.com <endlessroad1991 <at> gmail.com>
Subject: Technical details discussion for SEH
Newsgroups: gmane.comp.compilers.llvm.devel
Date: Friday 31st January 2014 04:29:01 UTC (over 3 years ago)
Hi Jb,

It's good to see someone step up and take a shot as this again. I dropped
this because it seems to me it wasn't a high priority task for LLVM/Clang.

Implementing SEH is more of LLVM work than Clang work.

For 32-bit SEH, there are prologue/epilogue instruction sequence to emit,
setting try-level ([ebp-4]), recovering EBP ([ebp-18h]), and all these can
only happen in LLVM, not Clang. In my opinion, we should implement these as
LLVM intrinsics, like the gcc ones: see
http://llvm.org/docs/ExceptionHandling.html#exception-handling-intrinsics.
Also, we should emit the tables for each function, which is not a simple
task either.

For 64-bit SEH, things are simpler. There are no more instructions to emit
than no-SEH code. We have only two tasks: emit the table for each function,
and place some code right. If I remember it correctly, __finally block code
should be replicated at 2 places: one in the original function as part of
the normal execution path, and other one separately if anything in __try
block goes south.
As for the table part, I've seen some commits from Kai(as CC'ed in this
email) doing it, you should ask him for details.

Thanks again.

-- 
Best Regards, Tong Shen (沈彤)
 
CD: 3ms