2010-02-16 Sami Wagiaalla <swagiaal@redhat.com>
[deliverable/binutils-gdb.git] / gdb / i387-tdep.c
index 2444d5c1e212e03d6ba598896416d80ec7045711..3fb5b56f4cf805d7522faf65307f5feade1f57c2 100644 (file)
@@ -1,7 +1,8 @@
 /* Intel 387 floating point stuff.
 
    Copyright (C) 1988, 1989, 1991, 1992, 1993, 1994, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -389,7 +390,9 @@ static int fsave_offset[] =
 void
 i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   const gdb_byte *regs = fsave;
   int i;
 
@@ -429,7 +432,7 @@ i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
     {
       gdb_byte buf[4];
 
-      store_unsigned_integer (buf, 4, 0x1f80);
+      store_unsigned_integer (buf, 4, byte_order, 0x1f80);
       regcache_raw_supply (regcache, I387_MXCSR_REGNUM (tdep), buf);
     }
 }
This page took 0.039042 seconds and 4 git commands to generate.