Fix use of wrong struct i387_xsave field in i387_cache_to_xsave
authorJoel Brobecker <brobecker@adacore.com>
Sat, 10 Jan 2015 05:50:44 +0000 (09:50 +0400)
committerJoel Brobecker <brobecker@adacore.com>
Sat, 10 Jan 2015 05:57:23 +0000 (09:57 +0400)
gdb/gdbserver/ChangeLog:

        * i387-fp.c (i387_cache_to_xsave): In look over
        num_avx512_zmmh_high_registers, replace use of struct i387_xsave
        zmmh_low_space field by use of zmmh_high_space.

Tested on x86_64-linux, using boards/native-gdbserver.exp.

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

index 180e341c9e264bbe8cd7d168ffbe82b0aec7f807..d126748209cae15fbfe23cda735f97eb343c5ba0 100644 (file)
@@ -1,3 +1,9 @@
+2015-01-10  Joel Brobecker  <brobecker@adacore.com>
+
+       * i387-fp.c (i387_cache_to_xsave): In look over
+       num_avx512_zmmh_high_registers, replace use of struct i387_xsave
+       zmmh_low_space field by use of zmmh_high_space.
+
 2015-01-09  Pedro Alves  <palves@redhat.com>
 
        * linux-low.c (step_over_bkpt): Move higher up in the file.
index a4c218de6e6d1e1d223b5449f5cf9078a4acd5bf..ddfec6e0936c5c7a14dd3439158ffbbe480e21b6 100644 (file)
@@ -454,7 +454,7 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
       for (i = 0; i < num_avx512_zmmh_high_registers; i++)
        {
          collect_register (regcache, i + zmm16h_regnum, raw);
-         p = ((char *) &fp->zmmh_low_space[0]) + 32 + i * 64;
+         p = ((char *) &fp->zmmh_high_space[0]) + 32 + i * 64;
          if (memcmp (raw, p, 32) != 0)
            {
              xstate_bv |= X86_XSTATE_ZMM;