summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCTargetMachine.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
commite1e0f485f9721a0c4236326f32d0a48561a1af7a (patch)
treea5f258e56eb985580e41c7c7f28843c2e0830940 /lib/Target/PowerPC/PPCTargetMachine.cpp
parent6e3be14be4eadd9aefea654611c808eea9eb8aea (diff)
downloadllvm-e1e0f485f9721a0c4236326f32d0a48561a1af7a.tar.gz
llvm-e1e0f485f9721a0c4236326f32d0a48561a1af7a.tar.bz2
llvm-e1e0f485f9721a0c4236326f32d0a48561a1af7a.tar.xz
Even more explanation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93841 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--lib/Target/PowerPC/PPCTargetMachine.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
index c80a530c88..c7f788238a 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -201,6 +201,18 @@ bool PPCTargetMachine::addSimpleCodeEmitter(PassManagerBase &PM,
/// 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.