2015-11-15 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (SIM_OBJS): Add sim-reg.o.
+ * interp.c (sim_store_register): Rename to ...
+ (mcore_reg_store): ... this. Change SIM_DESC to SIM_CPU.
+ (sim_fetch_register): Rename to ...
+ (mcore_reg_fetch): ... this. Change SIM_DESC to SIM_CPU.
+ (sim_open): Call CPU_REG_FETCH and CPU_REG_STORE.
+
+2015-11-15 Mike Frysinger <vapier@gentoo.org>
+
* Makefile.in (SIM_OBJS): Add sim-reason.o and sim-resume.o.
* interp.c (struct mcore_regset): Delete exception.
(util): Add SIM_DESC and SIM_CPU args. Call sim_engine_halt instead
}
}
-int
-sim_store_register (SIM_DESC sd, int rn, unsigned char *memory, int length)
+static int
+mcore_reg_store (SIM_CPU *scpu, int rn, unsigned char *memory, int length)
{
if (rn < NUM_MCORE_REGS && rn >= 0)
{
return 0;
}
-int
-sim_fetch_register (SIM_DESC sd, int rn, unsigned char *memory, int length)
+static int
+mcore_reg_fetch (SIM_CPU *scpu, int rn, unsigned char *memory, int length)
{
if (rn < NUM_MCORE_REGS && rn >= 0)
{
{
SIM_CPU *cpu = STATE_CPU (sd, i);
+ CPU_REG_FETCH (cpu) = mcore_reg_fetch;
+ CPU_REG_STORE (cpu) = mcore_reg_store;
CPU_PC_FETCH (cpu) = mcore_pc_get;
CPU_PC_STORE (cpu) = mcore_pc_set;