summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-01-19 02:44:01 +0000
committerBill Wendling <isanbard@gmail.com>2010-01-19 02:44:01 +0000
commit220c29465e3951cde1f79590229648e8bf903bd7 (patch)
treed06e9c848d5b5ea6782fad836c452cde568d8117 /llvm/lib/Target/X86/X86TargetMachine.cpp
parentbbf5ba66a93a883e67bbb9c0808dbf8e3f0182c1 (diff)
downloadbcm5719-llvm-220c29465e3951cde1f79590229648e8bf903bd7.tar.gz
bcm5719-llvm-220c29465e3951cde1f79590229648e8bf903bd7.zip
Even more explanation.
llvm-svn: 93841
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index 684e1fc573d..445318e64fb 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -257,6 +257,18 @@ void X86TargetMachine::setCodeModelForJIT() {
/// to bugs or other conditions. We will default to a 4-byte encoding unless the
/// system tells us otherwise.
///
+/// The issue is when the CIE says their is an LSDA. That mandates that every
+/// FDE have an LSDA slot. But if the function does not need an LSDA. There
+/// needs to be some way to signify there is none. The LSDA is encoded as
+/// pc-rel. But you don't look for some magic value after adding the pc. You
+/// have to look for a zero before adding the pc. The problem is that the size
+/// of the zero to look for depends on the encoding. The unwinder bug in SL is
+/// that it always checks for a pointer-size zero. So on x86_64 it looks for 8
+/// bytes of zero. If you have an LSDA, it works fine since the 8-bytes are
+/// non-zero so it goes ahead and then reads the value based on the encoding.
+/// But if you use sdata4 and there is no LSDA, then the test for zero gives a
+/// false negative and the unwinder thinks there is an LSDA.
+///
/// FIXME: This call-back isn't good! We should be using the correct encoding
/// regardless of the system. However, there are some systems which have bugs
/// that prevent this from occuring.
OpenPOWER on IntegriCloud