From: Jim Laskey Date: Fri, 24 Mar 2006 21:13:21 +0000 (+0000) Subject: Add support for dwarf register numbering. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8da17b242ff9935fc3caf2c0ef93f1edeab170d4;p=oota-llvm.git Add support for dwarf register numbering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27080 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Target.td b/lib/Target/Target.td index 3fef70785c3..4c846741cae 100644 --- a/lib/Target/Target.td +++ b/lib/Target/Target.td @@ -43,6 +43,13 @@ class Register { // registers. // list Aliases = []; + + // DwarfNumber - Number used internally by gcc/gdb to identify the register. + // These values can be determined by locating the .h file in the + // directory llvmgcc/gcc/config// 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 @@ -91,6 +98,20 @@ class RegisterClass regTypes, int alignment, } +//===----------------------------------------------------------------------===// +// 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 { + // DwarfNumber - Number used internally by gcc/gdb to identify the register. + // These values can be determined by locating the .h file in the + // directory llvmgcc/gcc/config// 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 //