[llvm-commits] CVS: llvm/lib/Target/Target.td

Jim Laskey jlaskey at apple.com
Fri Mar 24 13:13:34 PST 2006



Changes in directory llvm/lib/Target:

Target.td updated: 1.74 -> 1.75
---
Log message:

Add support for dwarf register numbering.


---
Diffs of the changes:  (+21 -0)

 Target.td |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+)


Index: llvm/lib/Target/Target.td
diff -u llvm/lib/Target/Target.td:1.74 llvm/lib/Target/Target.td:1.75
--- llvm/lib/Target/Target.td:1.74	Fri Mar 24 12:52:35 2006
+++ llvm/lib/Target/Target.td	Fri Mar 24 15:13:21 2006
@@ -43,6 +43,13 @@
   // registers.
   //
   list<Register> Aliases = [];
+  
+  // DwarfNumber - Number used internally by gcc/gdb to identify the register.
+  // These values can be determined by locating the <target>.h file in the
+  // directory llvmgcc/gcc/config/<target>/ and looking for REGISTER_NAMES.  The
+  // order of these names correspond to the enumeration used by gcc.  A value of
+  // -1 indicates that the gcc number is undefined.
+  int DwarfNumber = -1;
 }
 
 // RegisterGroup - This can be used to define instances of Register which
@@ -92,6 +99,20 @@
 
 
 //===----------------------------------------------------------------------===//
+// DwarfRegNum - This class provides a mapping of the llvm register enumeration
+// to the register numbering used by gcc and gdb.  These values are used by a
+// debug information writer (ex. DwarfWriter) to describe where values may be
+// located during execution.
+class DwarfRegNum<int N> {
+  // DwarfNumber - Number used internally by gcc/gdb to identify the register.
+  // These values can be determined by locating the <target>.h file in the
+  // directory llvmgcc/gcc/config/<target>/ and looking for REGISTER_NAMES.  The
+  // order of these names correspond to the enumeration used by gcc.  A value of
+  // -1 indicates that the gcc number is undefined.
+  int DwarfNumber = N;
+}
+
+//===----------------------------------------------------------------------===//
 // Pull in the common support for scheduling
 //
 include "../TargetSchedule.td"






More information about the llvm-commits mailing list