From: John Baldwin Date: Mon, 8 May 2023 17:39:52 +0000 (-0700) Subject: gdbserver: Clear upper ZMM registers in the right location. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=642a97391ae81d6a774aae651889501e4e840f0e;p=binutils-gdb.git gdbserver: Clear upper ZMM registers in the right location. This was previously clearing the upper 32 bytes of ZMM0-15 rather than ZMM16-31. Approved-By: Simon Marchi --- diff --git a/gdbserver/i387-fp.cc b/gdbserver/i387-fp.cc index 12cb614e5d8..49795ace9a9 100644 --- a/gdbserver/i387-fp.cc +++ b/gdbserver/i387-fp.cc @@ -322,7 +322,7 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf) if ((clear_bv & X86_XSTATE_ZMM)) { for (i = 0; i < num_avx512_zmmh_high_registers; i++) - memset (((char *) &fp->zmmh_low_space[0]) + 32 + i * 64, 0, 32); + memset (((char *) &fp->zmmh_high_space[0]) + 32 + i * 64, 0, 32); for (i = 0; i < num_avx512_xmm_registers; i++) memset (((char *) &fp->zmmh_high_space[0]) + i * 64, 0, 16); for (i = 0; i < num_avx512_ymmh_registers; i++)