Use TableGen to emit information for dwarf register numbers.
This makes DwarfRegNum to accept list of numbers instead.
Added three different "flavours", but only slightly tested on x86-32/linux.
Please check another subtargets if possible,
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43997 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/Target.td b/lib/Target/Target.td
index 15213ce..c7aaed9 100644
--- a/lib/Target/Target.td
+++ b/lib/Target/Target.td
@@ -49,12 +49,12 @@
// not [AX, AH, AL].
list<Register> SubRegs = [];
- // DwarfNumber - Number used internally by gcc/gdb to identify the register.
+ // DwarfNumbers - Numbers 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;
+ list<int> DwarfNumbers = [];
}
// RegisterWithSubRegs - This can be used to define instances of Register which
@@ -133,13 +133,13 @@
// 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.
+class DwarfRegNum<list<int> Numbers> {
+ // DwarfNumbers - Numbers 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;
+ list<int> DwarfNumbers = Numbers;
}
//===----------------------------------------------------------------------===//