]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/v850/interp.c
sim: arm/d10v/h8300/m68hc11/microblaze/mips/mn10300/moxie/sh/v850: convert to common...
[thirdparty/binutils-gdb.git] / sim / v850 / interp.c
index f055149cce6366aaec99c3c2105e8d07fe207749..422d926b2db63ffc8f36c1d241342bdc16c2a29d 100644 (file)
@@ -188,6 +188,9 @@ v850_pc_set (sim_cpu *cpu, sim_cia pc)
   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,
@@ -296,6 +299,8 @@ sim_open (SIM_OPEN_KIND    kind,
     {
       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;
     }
@@ -315,21 +320,15 @@ sim_create_inferior (SIM_DESC      sd,
   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;