diff options
| author | Bill Wendling <isanbard@gmail.com> | 2010-01-18 22:36:35 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2010-01-18 22:36:35 +0000 |
| commit | 63104740422ba784cb34b08c97f1a8ecc0608cc5 (patch) | |
| tree | f1ba3546a5e28712014ed16f3e0e4b58d218b29e /lib/Target/PowerPC/PPCTargetMachine.cpp | |
| parent | 986af0f0f8da10f960a0d3b715c12a464727c62a (diff) | |
| download | external_llvm-63104740422ba784cb34b08c97f1a8ecc0608cc5.zip external_llvm-63104740422ba784cb34b08c97f1a8ecc0608cc5.tar.gz external_llvm-63104740422ba784cb34b08c97f1a8ecc0608cc5.tar.bz2 | |
- Add getLSDAEncoding to the PowerPC backend.
- Greatly improve the comments to the getLSDAEncoding method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93796 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetMachine.cpp')
| -rw-r--r-- | lib/Target/PowerPC/PPCTargetMachine.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index 8079c6e..c80a530 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -194,4 +194,19 @@ bool PPCTargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, return false; } - +/// getLSDAEncoding - Returns the LSDA pointer encoding. The choices are 4-byte, +/// 8-byte, and target default. The CIE is hard-coded to indicate that the LSDA +/// pointer in the FDE section is an "sdata4", and should be encoded as a 4-byte +/// pointer by default. However, some systems may require a different size due +/// to bugs or other conditions. We will default to a 4-byte encoding unless the +/// system tells us otherwise. +/// +/// 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. +DwarfLSDAEncoding::Encoding PPCTargetMachine::getLSDAEncoding() const { + if (Subtarget.isDarwin() && Subtarget.getDarwinVers() != 10) + return DwarfLSDAEncoding::Default; + + return DwarfLSDAEncoding::EightByte; +} |
