aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2004-08-09 18:43:21 +0000
committerJim Blandy <jimb@codesourcery.com>2004-08-09 18:43:21 +0000
commit09991fa0eee7d10733f7a5b7b9420981af849c7e (patch)
treee898cfd196627aaed8020fa65d729dc574259ad9 /gdb/rs6000-tdep.c
parent1482e0de8287180d77144f53f4552bc2a497a4d1 (diff)
downloadgdb-09991fa0eee7d10733f7a5b7b9420981af849c7e.zip
gdb-09991fa0eee7d10733f7a5b7b9420981af849c7e.tar.gz
gdb-09991fa0eee7d10733f7a5b7b9420981af849c7e.tar.bz2
* rs6000-tdep.c (set_sim_regno, init_sim_regno_table,
rs6000_register_sim_regno): Doc fixes.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index fcd1463..36741c5 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -192,6 +192,14 @@ ppc_floating_point_unit_p (struct gdbarch *gdbarch)
&& tdep->ppc_fpscr_regnum >= 0);
}
+
+/* Check that TABLE[GDB_REGNO] is not already initialized, and then
+ set it to SIM_REGNO.
+
+ This is a helper function for init_sim_regno_table, constructing
+ the table mapping GDB register numbers to sim register numbers; we
+ initialize every element in that table to -1 before we start
+ filling it in. */
static void
set_sim_regno (int *table, int gdb_regno, int sim_regno)
{
@@ -201,6 +209,10 @@ set_sim_regno (int *table, int gdb_regno, int sim_regno)
table[gdb_regno] = sim_regno;
}
+
+/* Initialize ARCH->tdep->sim_regno, the table mapping GDB register
+ numbers to simulator register numbers, based on the values placed
+ in the ARCH->tdep->ppc_foo_regnum members. */
static void
init_sim_regno_table (struct gdbarch *arch)
{
@@ -281,6 +293,9 @@ init_sim_regno_table (struct gdbarch *arch)
tdep->sim_regno = sim_regno;
}
+
+/* Given a GDB register number REG, return the corresponding SIM
+ register number. */
static int
rs6000_register_sim_regno (int reg)
{