[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp
Jim Laskey
jlaskey at apple.com
Mon Apr 10 16:09:33 PDT 2006
Changes in directory llvm/lib/CodeGen:
DwarfWriter.cpp updated: 1.56 -> 1.57
---
Log message:
Use existing information.
---
Diffs of the changes: (+14 -3)
DwarfWriter.cpp | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.56 llvm/lib/CodeGen/DwarfWriter.cpp:1.57
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.56 Fri Apr 7 19:35:59 2006
+++ llvm/lib/CodeGen/DwarfWriter.cpp Mon Apr 10 18:09:19 2006
@@ -25,6 +25,7 @@
#include "llvm/Support/Mangler.h"
#include "llvm/Target/MRegisterInfo.h"
#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetFrameInfo.h"
#include <iostream>
@@ -1829,8 +1830,13 @@
EmitULEB128Bytes(RI->getDwarfRegNum(Src.getRegister()));
EOL("Register");
}
-
- EmitULEB128Bytes(Src.getOffset() / RI->getStackDirection());
+
+ int stackGrowth =
+ Asm->TM.getFrameInfo()->getStackGrowthDirection() ==
+ TargetFrameInfo::StackGrowsUp ?
+ AddressSize : -AddressSize;
+
+ EmitULEB128Bytes(Src.getOffset() / stackGrowth);
EOL("Offset");
} else {
}
@@ -2049,6 +2055,11 @@
/// EmitInitialDebugFrame - Emit common frame info into a debug frame section.
///
void DwarfWriter::EmitInitialDebugFrame() {
+ int stackGrowth =
+ Asm->TM.getFrameInfo()->getStackGrowthDirection() ==
+ TargetFrameInfo::StackGrowsUp ?
+ AddressSize : -AddressSize;
+
// Start the dwarf frame section.
Asm->SwitchSection(DwarfFrameSection, 0);
@@ -2061,7 +2072,7 @@
EmitInt8(DW_CIE_VERSION); EOL("CIE Version");
EmitString(""); EOL("CIE Augmentation");
EmitULEB128Bytes(1); EOL("CIE Code Alignment Factor");
- EmitSLEB128Bytes(RI->getStackDirection()); EOL("CIE Data Alignment Factor");
+ EmitSLEB128Bytes(stackGrowth); EOL("CIE Data Alignment Factor");
EmitInt8(RI->getDwarfRegNum(RI->getRARegister())); EOL("CIE RA Column");
std::vector<MachineMove *> Moves;
More information about the llvm-commits
mailing list