* win32-nat.c (psapi_module_handle): Remove static.
[deliverable/binutils-gdb.git] / gdb / go32-nat.c
index a794c61b8ff462eae47fd0e0c5746778d8fd04e5..095ff667af9e8f7522a573f3bc148754e045b9f4 100644 (file)
@@ -7,7 +7,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -16,9 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <fcntl.h>
 
@@ -467,7 +465,7 @@ go32_wait (ptid_t ptid, struct target_waitstatus *status)
 static void
 fetch_register (struct regcache *regcache, int regno)
 {
-  if (regno < FP0_REGNUM)
+  if (regno < gdbarch_fp0_regnum (get_regcache_arch (regcache)))
     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))
@@ -484,7 +482,9 @@ go32_fetch_registers (struct regcache *regcache, int regno)
     fetch_register (regcache, regno);
   else
     {
-      for (regno = 0; regno < FP0_REGNUM; regno++)
+      for (regno = 0;
+          regno < gdbarch_fp0_regnum (get_regcache_arch (regcache));
+          regno++)
        fetch_register (regcache, regno);
       i387_supply_fsave (regcache, -1, &npx);
     }
@@ -493,7 +493,7 @@ go32_fetch_registers (struct regcache *regcache, int regno)
 static void
 store_register (const struct regcache *regcache, int regno)
 {
-  if (regno < FP0_REGNUM)
+  if (regno < gdbarch_fp0_regnum (get_regcache_arch (regcache)))
     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))
@@ -512,7 +512,7 @@ go32_store_registers (struct regcache *regcache, int regno)
     store_register (regcache, regno);
   else
     {
-      for (r = 0; r < FP0_REGNUM; r++)
+      for (r = 0; r < gdbarch_fp0_regnum (get_regcache_arch (regcache)); r++)
        store_register (regcache, r);
       i387_collect_fsave (regcache, -1, &npx);
     }
This page took 0.046127 seconds and 4 git commands to generate.