PC = pc;
}
+static int v850_reg_fetch (SIM_CPU *, int, unsigned char *, int);
+static int v850_reg_store (SIM_CPU *, int, unsigned char *, int);
+
SIM_DESC
sim_open (SIM_OPEN_KIND kind,
host_callback * cb,
{
SIM_CPU *cpu = STATE_CPU (sd, i);
+ CPU_REG_FETCH (cpu) = v850_reg_fetch;
+ CPU_REG_STORE (cpu) = v850_reg_store;
CPU_PC_FETCH (cpu) = v850_pc_get;
CPU_PC_STORE (cpu) = v850_pc_set;
}
return SIM_RC_OK;
}
-int
-sim_fetch_register (SIM_DESC sd,
- int rn,
- unsigned char * memory,
- int length)
+static int
+v850_reg_fetch (SIM_CPU *cpu, int rn, unsigned char *memory, int length)
{
*(unsigned32*)memory = H2T_4 (State.regs[rn]);
return -1;
}
-
-int
-sim_store_register (SIM_DESC sd,
- int rn,
- unsigned char * memory,
- int length)
+
+static int
+v850_reg_store (SIM_CPU *cpu, int rn, unsigned char *memory, int length)
{
State.regs[rn] = T2H_4 (*(unsigned32 *) memory);
return length;