From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EA68F3858408; Sat, 2 Sep 2023 02:14:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA68F3858408 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693620899; bh=94cPMh4XZZWKCgcxETkdNDqpMtEpoVqIWfLN9510yw0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=O6EXX62UWavVlIuLxJ3To+L14Hp5mSOGbPDqc62UeQ6Zw3CjDJzRvK0tzz7oVw8FB XEqDf7p06Q6taMmFB+QGv1tZeTJv80eaFZdzJdNxR8B4MNc/gMta+6xU+goaoUCF4V +fd6ale2n4LuJLJBtJhcVbpzMHWXPHzu0YRKQwbc= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/30818] GDB + GDBserver doesn't set AVX512 registers properly Date: Sat, 02 Sep 2023 02:14:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30818 --- Comment #1 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Simon Marchi : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D41770089162e= dd23ea7ae33b7952585316accde5 commit 41770089162edd23ea7ae33b7952585316accde5 Author: Simon Marchi Date: Fri Sep 1 14:12:07 2023 -0400 gdbserver: i387_cache_to_xsave: fix copy dest of zmm registers On a machine with AVX512 support (AMD EPYC 9634), I see these failures: $ make check TESTS=3D"gdb.arch/i386-avx512.exp" RUNTESTFLAGS=3D"--target_board=3Dnative-gdbserver" ... FAIL: gdb.arch/i386-avx512.exp: check contents of zmm_data[16] after writing ZMM regs FAIL: gdb.arch/i386-avx512.exp: check contents of zmm_data[17] after writing ZMM regs FAIL: gdb.arch/i386-avx512.exp: check contents of zmm_data[18] after writing ZMM regs ... The problem can be reduced to: (gdb) print $zmm16.v8_int64 $1 =3D {0, 0, 0, 0, 0, 0, 0, 0} (gdb) print $zmm16.v8_int64 =3D {11,22,33,44,55,66,77,88} $2 =3D {11, 22, 33, 44, 55, 66, 77, 88} (gdb) print $zmm16.v8_int64 $3 =3D {11, 22, 33, 44, 55, 66, 77, 88} (gdb) step 5 ++x; (gdb) print $zmm16.v8_int64 $4 =3D {11, 22, 77, 88, 0, 0, 0, 0} Writing to the local regcache in GDB works fine, but the writeback to gdbserver (which happens when resuming / stepping) doesn't work (the code being stepped doesn't touch AVX registers, so we don't expect the value of zmm16 to change when stepping). The problem is on the gdbserver side, the zmmh and ymmh portions of the zmm register are not memcpied at the right place in the xsave buffer. = Fix that. Note now how the two modified memcpy calls match the memcmp calls just above them. With this patch, gdb.arch/i386-avx512.exp passes completely for me. Change-Id: I22c417e0f5e88d4bc635a0f08f8817a031c76433 Reviewed-by: John Baldwin Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30818 --=20 You are receiving this mail because: You are on the CC list for the bug.=