*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / go32-nat.c
index c64874f4aaba8174845397eefabe892a93f86eeb..189570db8bd976cb59ea2d62c0bde229b8f46c9c 100644 (file)
@@ -174,10 +174,10 @@ static void go32_resume (ptid_t ptid, int step,
                          enum target_signal siggnal);
 static ptid_t go32_wait (ptid_t ptid,
                                struct target_waitstatus *status);
-static void go32_fetch_registers (int regno);
-static void store_register (int regno);
-static void go32_store_registers (int regno);
-static void go32_prepare_to_store (void);
+static void go32_fetch_registers (struct regcache *, int regno);
+static void store_register (const struct regcache *, int regno);
+static void go32_store_registers (struct regcache *, int regno);
+static void go32_prepare_to_store (struct regcache *);
 static int go32_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
                             int write,
                             struct mem_attrib *attrib,
@@ -465,61 +465,61 @@ go32_wait (ptid_t ptid, struct target_waitstatus *status)
 }
 
 static void
-fetch_register (int regno)
+fetch_register (struct regcache *regcache, int regno)
 {
-  if (regno < FP0_REGNUM)
-    regcache_raw_supply (current_regcache, regno,
+  if (regno < gdbarch_fp0_regnum (current_gdbarch))
+    regcache_raw_supply (regcache, regno,
                         (char *) &a_tss + regno_mapping[regno].tss_ofs);
   else if (i386_fp_regnum_p (regno) || i386_fpc_regnum_p (regno))
-    i387_supply_fsave (current_regcache, regno, &npx);
+    i387_supply_fsave (regcache, regno, &npx);
   else
     internal_error (__FILE__, __LINE__,
                    _("Invalid register no. %d in fetch_register."), regno);
 }
 
 static void
-go32_fetch_registers (int regno)
+go32_fetch_registers (struct regcache *regcache, int regno)
 {
   if (regno >= 0)
-    fetch_register (regno);
+    fetch_register (regcache, regno);
   else
     {
-      for (regno = 0; regno < FP0_REGNUM; regno++)
-       fetch_register (regno);
-      i387_supply_fsave (current_regcache, -1, &npx);
+      for (regno = 0; regno < gdbarch_fp0_regnum (current_gdbarch); regno++)
+       fetch_register (regcache, regno);
+      i387_supply_fsave (regcache, -1, &npx);
     }
 }
 
 static void
-store_register (int regno)
+store_register (const struct regcache *regcache, int regno)
 {
-  if (regno < FP0_REGNUM)
-    regcache_raw_collect (current_regcache, regno,
+  if (regno < gdbarch_fp0_regnum (current_gdbarch))
+    regcache_raw_collect (regcache, regno,
                          (char *) &a_tss + regno_mapping[regno].tss_ofs);
   else if (i386_fp_regnum_p (regno) || i386_fpc_regnum_p (regno))
-    i387_fill_fsave ((char *) &npx, regno);
+    i387_collect_fsave (regcache, regno, &npx);
   else
     internal_error (__FILE__, __LINE__,
                    _("Invalid register no. %d in store_register."), regno);
 }
 
 static void
-go32_store_registers (int regno)
+go32_store_registers (struct regcache *regcache, int regno)
 {
   unsigned r;
 
   if (regno >= 0)
-    store_register (regno);
+    store_register (regcache, regno);
   else
     {
-      for (r = 0; r < FP0_REGNUM; r++)
-       store_register (r);
-      i387_fill_fsave ((char *) &npx, -1);
+      for (r = 0; r < gdbarch_fp0_regnum (current_gdbarch); r++)
+       store_register (regcache, r);
+      i387_collect_fsave (regcache, -1, &npx);
     }
 }
 
 static void
-go32_prepare_to_store (void)
+go32_prepare_to_store (struct regcache *regcache)
 {
 }
 
This page took 0.025761 seconds and 4 git commands to generate.