[llvm-commits] [llvm] r93753 - in /llvm/trunk: include/llvm/Target/TargetMachine.h lib/CodeGen/AsmPrinter/DwarfException.cpp lib/Target/X86/X86TargetMachine.cpp
Bill Wendling
isanbard at gmail.com
Mon Jan 18 11:36:27 PST 2010
Author: void
Date: Mon Jan 18 13:36:27 2010
New Revision: 93753
URL: http://llvm.org/viewvc/llvm-project?rev=93753&view=rev
Log:
- Add a comment to the callback indicating that it's *extremely* not a good
idea, but unfortunately necessary.
- Default to using 4-bytes for the LSDA pointer encoding to agree with the
encoded value in the CIE.
Modified:
llvm/trunk/include/llvm/Target/TargetMachine.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
Modified: llvm/trunk/include/llvm/Target/TargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=93753&r1=93752&r2=93753&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetMachine.h (original)
+++ llvm/trunk/include/llvm/Target/TargetMachine.h Mon Jan 18 13:36:27 2010
@@ -202,6 +202,9 @@
/// getLSDAEncoding - Returns the LSDA pointer encoding. The choices are
/// 4-byte, 8-byte, and target default.
+ /// 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.
virtual DwarfLSDAEncoding::Encoding getLSDAEncoding() const {
return DwarfLSDAEncoding::Default;
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=93753&r1=93752&r2=93753&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Mon Jan 18 13:36:27 2010
@@ -283,7 +283,7 @@
if (MMI->getPersonalities()[0] != NULL) {
bool is4Byte = TD->getPointerSize() == sizeof(int32_t);
- if (Asm->TM.getLSDAEncoding() == DwarfLSDAEncoding::FourByte) {
+ if (Asm->TM.getLSDAEncoding() != DwarfLSDAEncoding::EightByte) {
Asm->EmitULEB128Bytes(4);
Asm->EOL("Augmentation size");
Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=93753&r1=93752&r2=93753&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Mon Jan 18 13:36:27 2010
@@ -251,8 +251,8 @@
}
DwarfLSDAEncoding::Encoding X86TargetMachine::getLSDAEncoding() const {
- if (Subtarget.isTargetDarwin() && Subtarget.getDarwinVers() > 10)
+ if (Subtarget.isTargetDarwin() && Subtarget.getDarwinVers() != 10)
return DwarfLSDAEncoding::FourByte;
- return DwarfLSDAEncoding::Default;
+ return DwarfLSDAEncoding::EightByte;
}
More information about the llvm-commits
mailing list