[llvm-commits] [llvm] r96287 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp

Anton Korobeynikov asl at math.spbu.ru
Mon Feb 15 14:36:41 PST 2010


Author: asl
Date: Mon Feb 15 16:36:41 2010
New Revision: 96287

URL: http://llvm.org/viewvc/llvm-project?rev=96287&view=rev
Log:
It turns out that we emitted completely wrong common EH frame since the early beginning! The "z" CIE augmentation mark indicates that there is an extra word containing the size of augmentation section. However, even for frames w/o any augmentation data we emitted size uleb! (this is the case of "unwinding through C code"). Thus frame moves information was emitterd completely wrong.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=96287&r1=96286&r2=96287&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Mon Feb 15 16:36:41 2010
@@ -147,13 +147,15 @@
   Asm->EmitInt8(RI->getDwarfRegNum(RI->getRARegister(), true));
   EOL("CIE Return Address Column");
 
-  EmitULEB128(AugmentationSize, "Augmentation Size");
+  if (Augmentation[0]) {
+    EmitULEB128(AugmentationSize, "Augmentation Size");
 
-  // If there is a personality, we need to indicate the function's location.
-  if (PersonalityFn) {
-    EmitEncodingByte(PerEncoding, "Personality");
-    EmitReference(PersonalityFn, PerEncoding);
-    EOL("Personality");
+    // If there is a personality, we need to indicate the function's location.
+    if (PersonalityFn) {
+      EmitEncodingByte(PerEncoding, "Personality");
+      EmitReference(PersonalityFn, PerEncoding);
+      EOL("Personality");
+    }
     if (UsesLSDA[Index])
       EmitEncodingByte(LSDAEncoding, "LSDA");
     if (FDEEncoding != dwarf::DW_EH_PE_absptr)





More information about the llvm-commits mailing list