]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
authorDaniel Jacobowitz <drow@false.org>
Fri, 30 Mar 2007 15:29:46 +0000 (15:29 +0000)
committerDaniel Jacobowitz <drow@false.org>
Fri, 30 Mar 2007 15:29:46 +0000 (15:29 +0000)
(i387_fxsave_to_cache): Check fp->ftag while building ftag value.

gdb/gdbserver/ChangeLog
gdb/gdbserver/i387-fp.c

index 5efef46a0e52034b17ab66ae6c7bfbb7bfe519d9..602dae0e3137d521e43805434a54c80f9e569d6c 100644 (file)
@@ -1,3 +1,8 @@
+2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
+       (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
+
 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
 
        * configure.srv (arm*-*-mingw32ce*): Move near the other
index cce8790dc2ac5e96cfd2217aa1795ddfca89adc8..e0b460fc7425693974073eeeb6d284c1738571b5 100644 (file)
@@ -174,6 +174,7 @@ i387_cache_to_fxsave (void *buf)
   /* Convert to the simplifed tag form stored in fxsave data.  */
   collect_register_by_name ("ftag", &val);
   val &= 0xFFFF;
+  val2 = 0;
   for (i = 7; i >= 0; i--)
     {
       int tag = (val >> (i * 2)) & 3;
@@ -270,7 +271,7 @@ i387_fxsave_to_cache (const void *buf)
   for (i = 7; i >= 0; i--)
     {
       int tag;
-      if (val & (1 << i))
+      if (fp->ftag & (1 << i))
        tag = i387_ftag (fp, (i + 8 - top) % 8);
       else
        tag = 3;