aboutsummaryrefslogtreecommitdiff
path: root/gdb/tm-29k.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tm-29k.h')
-rw-r--r--gdb/tm-29k.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/tm-29k.h b/gdb/tm-29k.h
index 72e4d98..825cf96 100644
--- a/gdb/tm-29k.h
+++ b/gdb/tm-29k.h
@@ -151,6 +151,16 @@ CORE_ADDR skip_prologue ();
"alu", "ipc", "ipa", "ipb" }
/*
+ * Converts an sdb register number to an internal gdb register number.
+ * Currently under epi, gr96->0...gr127->31...lr0->32...lr127->159, or...
+ * gr64->0...gr95->31, lr0->32...lr127->159.
+ */
+#define SDB_REG_TO_REGNUM(value) \
+ (((value) >= 96 && (value) <= 127) ? ((value) - 96) : \
+ ((value) >= 128 && (value) <= 255) ? ((value) - 128 + LR0_REGNUM) : \
+ (value))
+
+/*
* Provide the processor register numbers of some registers that are
* expected/written in instructions that might change under different
* register sets. Namely, gcc can compile (-mkernel-registers) so that