aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2010-06-24 20:38:05 +0000
committerKevin Buettner <kevinb@redhat.com>2010-06-24 20:38:05 +0000
commitfd60dc691fb51f108b1e74025e4a2751dced8d32 (patch)
treee30c0543352b88167fcf456e025e669f3f8d1e35
parent1843028924270956593a8870cce75a4033531910 (diff)
downloadgdb-fd60dc691fb51f108b1e74025e4a2751dced8d32.zip
gdb-fd60dc691fb51f108b1e74025e4a2751dced8d32.tar.gz
gdb-fd60dc691fb51f108b1e74025e4a2751dced8d32.tar.bz2
Add "acc" register. Revise register order and names.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/rx-tdep.c18
-rw-r--r--include/gdb/ChangeLog5
-rw-r--r--include/gdb/sim-rx.h9
-rw-r--r--sim/rx/ChangeLog5
-rw-r--r--sim/rx/gdb-if.c7
6 files changed, 42 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d3f057e..c94b08c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2010-06-24 Kevin Buettner <kevinb@redhat.com>
+
+ * rx-tdep.c (RX_ACC_REGNUM): Define.
+ (RX_NUM_REGS): Redefine to 26.
+ (rx_register_name): Add register "acc". Change order of several
+ registers. Change name of "vct" register to "fintv" to match RX
+ documentation.
+ (rx_register_type): Add case for RX_ACC_REGNUM.
+
2010-06-24 Tom Tromey <tromey@redhat.com>
* psymtab.c (lookup_partial_symbol): Mark definition as static.
diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c
index 6506de9..de9eec6 100644
--- a/gdb/rx-tdep.c
+++ b/gdb/rx-tdep.c
@@ -46,7 +46,8 @@ enum
RX_FP_REGNUM = 6,
RX_R15_REGNUM = 15,
RX_PC_REGNUM = 19,
- RX_NUM_REGS = 25
+ RX_ACC_REGNUM = 25,
+ RX_NUM_REGS = 26
};
/* Architecture specific data. */
@@ -111,15 +112,16 @@ rx_register_name (struct gdbarch *gdbarch, int regnr)
"r13",
"r14",
"r15",
- "isp",
"usp",
- "intb",
- "pc",
+ "isp",
"psw",
- "bpc",
+ "pc",
+ "intb",
"bpsw",
- "vct",
- "fpsw"
+ "bpc",
+ "fintv",
+ "fpsw",
+ "acc"
};
return reg_names[regnr];
@@ -131,6 +133,8 @@ rx_register_type (struct gdbarch *gdbarch, int reg_nr)
{
if (reg_nr == RX_PC_REGNUM)
return builtin_type (gdbarch)->builtin_func_ptr;
+ else if (reg_nr == RX_ACC_REGNUM)
+ return builtin_type (gdbarch)->builtin_unsigned_long_long;
else
return builtin_type (gdbarch)->builtin_unsigned_long;
}
diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog
index 54815ec..b4d2c68 100644
--- a/include/gdb/ChangeLog
+++ b/include/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-24 Kevin Buettner <kevinb@redhat.com>
+
+ * sim-rx.h (sim_rx_regnum): Add sim_rx_acc_regnum. Adjust
+ register order.
+
2010-04-13 Mike Frysinger <vapier@gentoo.org>
* callback.h: Strip PARAMS from prototypes.
diff --git a/include/gdb/sim-rx.h b/include/gdb/sim-rx.h
index 2a7988b..e3ee1d3 100644
--- a/include/gdb/sim-rx.h
+++ b/include/gdb/sim-rx.h
@@ -40,15 +40,16 @@ enum sim_rx_regnum
sim_rx_r13_regnum,
sim_rx_r14_regnum,
sim_rx_r15_regnum,
- sim_rx_isp_regnum,
sim_rx_usp_regnum,
- sim_rx_intb_regnum,
- sim_rx_pc_regnum,
+ sim_rx_isp_regnum,
sim_rx_ps_regnum,
- sim_rx_bpc_regnum,
+ sim_rx_pc_regnum,
+ sim_rx_intb_regnum,
sim_rx_bpsw_regnum,
+ sim_rx_bpc_regnum,
sim_rx_fintv_regnum,
sim_rx_fpsw_regnum,
+ sim_rx_acc_regnum,
sim_rx_num_regs
};
diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog
index 73558ce..53a0717 100644
--- a/sim/rx/ChangeLog
+++ b/sim/rx/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-24 Kevin Buettner <kevinb@redhat.com>
+
+ * gdb-if.c (trace.h): Include.
+ (reg_size, sim_fetch_register): Add cases for sim_rx_acc_regnum.
+
2010-06-07 Nick Clifton <nickc@redhat.com>
* reg.c (set_oszc): Use unsigned int for the mask.
diff --git a/sim/rx/gdb-if.c b/sim/rx/gdb-if.c
index 5326bb3..b92c01d 100644
--- a/sim/rx/gdb-if.c
+++ b/sim/rx/gdb-if.c
@@ -36,6 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "load.h"
#include "syscalls.h"
#include "err.h"
+#include "trace.h"
/* Ideally, we'd wrap up all the minisim's data structures in an
object and pass that around. However, neither GDB nor run needs
@@ -403,6 +404,9 @@ reg_size (enum sim_rx_regnum regno)
case sim_rx_fpsw_regnum:
size = sizeof (regs.r_fpsw);
break;
+ case sim_rx_acc_regnum:
+ size = sizeof (regs.r_acc);
+ break;
default:
size = 0;
break;
@@ -503,6 +507,9 @@ sim_fetch_register (SIM_DESC sd, int regno, unsigned char *buf, int length)
case sim_rx_fpsw_regnum:
val = get_reg (fpsw);
break;
+ case sim_rx_acc_regnum:
+ val = ((DI) get_reg (acchi) << 32) | get_reg (acclo);
+ break;
default:
fprintf (stderr, "rx minisim: unrecognized register number: %d\n",
regno);