diff options
author | Jan Beulich <jbeulich@novell.com> | 2018-11-08 12:12:05 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2018-11-08 12:12:05 +0100 |
commit | b5420128da08dc81d94b265e88083d172909ea25 (patch) | |
tree | 8290f091f0a348b29db82e3289c3556369c8e8ff /gdb/testsuite/gdb.arch | |
parent | cd115d615c6558175a56c3d0896b6f1c62864cd1 (diff) | |
download | gdb-b5420128da08dc81d94b265e88083d172909ea25.zip gdb-b5420128da08dc81d94b265e88083d172909ea25.tar.gz gdb-b5420128da08dc81d94b265e88083d172909ea25.tar.bz2 |
x86-64: fix ZMM register state tracking
The three AVX512 state components are entirely independent - one being
in its "init state" has no implication whatsoever on either of the other
two. Fully separate X86_XSTATE_ZMM_H and X86_XSTATE_ZMM handling, to
prevent upper halves of the upper 16 ZMM registers to display as if they
were zero (when they aren't) after e.g. VZEROALL/VZEROUPPER.
Diffstat (limited to 'gdb/testsuite/gdb.arch')
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-avx512.c | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-avx512.exp | 10 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.arch/i386-avx512.c b/gdb/testsuite/gdb.arch/i386-avx512.c index 9349f09..0e27336 100644 --- a/gdb/testsuite/gdb.arch/i386-avx512.c +++ b/gdb/testsuite/gdb.arch/i386-avx512.c @@ -249,6 +249,13 @@ main (int argc, char **argv) move back to array and check values. */ move_zmm_data_to_memory (); asm ("nop"); /* sixth breakpoint here */ + + asm ("vpternlogd $0xff, %zmm0, %zmm0, %zmm0"); +#ifdef __x86_64__ + asm ("vpternlogd $0xff, %zmm0, %zmm0, %zmm16"); +#endif + asm ("vzeroupper"); + asm ("nop"); /* seventh breakpoint here */ } return 0; diff --git a/gdb/testsuite/gdb.arch/i386-avx512.exp b/gdb/testsuite/gdb.arch/i386-avx512.exp index cd15e05..43fde12 100644 --- a/gdb/testsuite/gdb.arch/i386-avx512.exp +++ b/gdb/testsuite/gdb.arch/i386-avx512.exp @@ -174,3 +174,13 @@ for { set r 0 } { $r < $nr_regs } { incr r } { ".. = \\{f = \\{[expr $r + 30], [expr $r.125 + 30], [expr $r.25 + 20], [expr $r.375 + 20], [expr $r.5 + 10], [expr $r.625 + 10], [expr $r.75 + 10], [expr $r.875 + 10]\\}\\}.*" \ "check contents of zmm_data\[$r\] after writing XMM regs" } + +gdb_test "break [gdb_get_line_number "seventh breakpoint here"]" \ + "Breakpoint .* at .*i386-avx512.c.*" \ + "set seventh breakpoint in main" +gdb_continue_to_breakpoint "continue to seventh breakpoint in main" +gdb_test "print \$zmm0.v16_int32" "= {-1, -1, -1, -1, 0 <repeats 12 times>}" + +if { $nr_regs >= 16 } { + gdb_test "print \$zmm16.v16_int32" "= {-1 <repeats 16 times>}" +} |