[llvm-commits] [llvm] r41852 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/CodeGen/DwarfWriter.cpp lib/Target/TargetAsmInfo.cpp lib/Target/X86/X86TargetAsmInfo.cpp

Bill Wendling isanbard at gmail.com
Tue Sep 11 10:20:55 PDT 2007


Author: void
Date: Tue Sep 11 12:20:55 2007
New Revision: 41852

URL: http://llvm.org/viewvc/llvm-project?rev=41852&view=rev
Log:
Add a bool to indicate if we should set the "indirect encoding" bit in the Dwarf
information for EH.


Modified:
    llvm/trunk/include/llvm/Target/TargetAsmInfo.h
    llvm/trunk/lib/CodeGen/DwarfWriter.cpp
    llvm/trunk/lib/Target/TargetAsmInfo.cpp
    llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp

Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=41852&r1=41851&r2=41852&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Tue Sep 11 12:20:55 2007
@@ -116,6 +116,11 @@
     const char *PersonalityPrefix;        // Defaults to ""
     const char *PersonalitySuffix;        // Defaults to ""
 
+    /// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
+    /// for EH in Dwarf.
+    /// 
+    bool NeedsIndirectEncoding;           // Defaults to false
+
     /// InlineAsmStart/End - If these are nonempty, they contain a directive to
     /// emit before and after an inline assembly statement.
     const char *InlineAsmStart;           // Defaults to "#APP\n"

Modified: llvm/trunk/lib/CodeGen/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfWriter.cpp?rev=41852&r1=41851&r2=41852&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/DwarfWriter.cpp Tue Sep 11 12:20:55 2007
@@ -2789,7 +2789,12 @@
     if (Personality) {
       Asm->EmitULEB128Bytes(7);
       Asm->EOL("Augmentation Size");
-      Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4 | DW_EH_PE_indirect);
+
+      if (TAI->getNeedsIndirectEncoding())
+        Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4 | DW_EH_PE_indirect);
+      else
+        Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4);
+
       Asm->EOL("Personality (pcrel sdata4 indirect)");
       
       PrintRelDirective();

Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=41852&r1=41851&r2=41852&view=diff

==============================================================================
--- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Tue Sep 11 12:20:55 2007
@@ -40,6 +40,7 @@
   FunctionAddrSuffix(""),
   PersonalityPrefix(""),
   PersonalitySuffix(""),
+  NeedsIndirectEncoding(false),
   InlineAsmStart("#APP"),
   InlineAsmEnd("#NO_APP"),
   AssemblerDialect(0),

Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp?rev=41852&r1=41851&r2=41852&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp Tue Sep 11 12:20:55 2007
@@ -70,6 +70,7 @@
     }
     PersonalityPrefix = "L";
     PersonalitySuffix = "$non_lazy_ptr";
+    NeedsIndirectEncoding = true;
     InlineAsmStart = "# InlineAsm Start";
     InlineAsmEnd = "# InlineAsm End";
     SetDirective = "\t.set";





More information about the llvm-commits mailing list