merge from gcc
[external/binutils.git] / gdb / i386v4-nat.c
index 695207b..5744c81 100644 (file)
@@ -1,13 +1,13 @@
 /* Native-dependent code for Unix SVR4 running on i386's.
 
    Copyright (C) 1988, 1989, 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2004, 2007 Free Software Foundation, Inc.
+   2002, 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    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 "defs.h"
 #include "value.h"
@@ -139,7 +137,7 @@ fill_gregset (const struct regcache *regcache,
 void
 supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
 {
-  if (FP0_REGNUM == 0)
+  if (gdbarch_fp0_regnum (get_regcache_arch (regcache)) == 0)
     return;
 
   i387_supply_fsave (regcache, -1, fpregsetp);
@@ -153,7 +151,7 @@ void
 fill_fpregset (const struct regcache *regcache,
               fpregset_t *fpregsetp, int regno)
 {
-  if (FP0_REGNUM == 0)
+  if (gdbarch_fp0_regnum (get_regcache_arch (regcache)) == 0)
     return;
 
   i387_collect_fsave (regcache, regno, fpregsetp);