From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27602 invoked by alias); 24 May 2009 19:00:59 -0000 Received: (qmail 27592 invoked by uid 22791); 24 May 2009 19:00:58 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_50,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 24 May 2009 19:00:53 +0000 Received: from zps76.corp.google.com (zps76.corp.google.com [172.25.146.76]) by smtp-out.google.com with ESMTP id n4OJ0nfS019448 for ; Sun, 24 May 2009 20:00:50 +0100 Received: from localhost (ruffy.mtv.corp.google.com [172.18.118.116]) by zps76.corp.google.com with ESMTP id n4OJ0mSO015108 for ; Sun, 24 May 2009 12:00:48 -0700 Received: by localhost (Postfix, from userid 67641) id E895D846C2; Sun, 24 May 2009 12:00:47 -0700 (PDT) To: gdb-patches@sourceware.org Subject: [RFA] xmm8-15 testcase Message-Id: <20090524190047.E895D846C2@localhost> Date: Sun, 24 May 2009 19:00:00 -0000 From: dje@google.com (Doug Evans) X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00536.txt.bz2 Hi. Awhile ago I promised a testcase to exercise xmm8-15. gdbserver for amd64 didn't support them (it does now). I've verified this fails on older gdbservers and passes in cvs head (as well as verifying it still passes for i?86). Ok to check in? 2009-05-24 Doug Evans * gdb.arch/i386-sse.exp: Test xmm[8-15] if amd64. * gdb.arch/i386-see.c: Ditto. Index: i386-sse.c =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-sse.c,v retrieving revision 1.6 diff -u -p -r1.6 i386-sse.c --- i386-sse.c 6 Feb 2009 08:48:29 -0000 1.6 +++ i386-sse.c 24 May 2009 18:57:38 -0000 @@ -25,16 +25,26 @@ typedef struct { } v4sf_t; -v4sf_t data[8] = +v4sf_t data[] = { - { { 0.0, 0.25, 0.50, 0.75 } }, - { { 1.0, 1.25, 1.50, 1.75 } }, - { { 2.0, 2.25, 2.50, 2.75 } }, - { { 3.0, 3.25, 3.50, 3.75 } }, - { { 4.0, 4.25, 4.50, 4.75 } }, - { { 5.0, 5.25, 5.50, 5.75 } }, - { { 6.0, 6.25, 6.50, 6.75 } }, - { { 7.0, 7.25, 7.50, 7.75 } }, + { { 0.0, 0.25, 0.50, 0.75 } }, + { { 1.0, 1.25, 1.50, 1.75 } }, + { { 2.0, 2.25, 2.50, 2.75 } }, + { { 3.0, 3.25, 3.50, 3.75 } }, + { { 4.0, 4.25, 4.50, 4.75 } }, + { { 5.0, 5.25, 5.50, 5.75 } }, + { { 6.0, 6.25, 6.50, 6.75 } }, + { { 7.0, 7.25, 7.50, 7.75 } }, +#ifdef __x86_64__ + { { 8.0, 8.25, 8.50, 8.75 } }, + { { 9.0, 9.25, 9.50, 9.75 } }, + { { 10.0, 10.25, 10.50, 10.75 } }, + { { 11.0, 11.25, 11.50, 11.75 } }, + { { 12.0, 12.25, 12.50, 12.75 } }, + { { 13.0, 13.25, 13.50, 13.75 } }, + { { 14.0, 14.25, 14.50, 14.75 } }, + { { 15.0, 15.25, 15.50, 15.75 } }, +#endif }; @@ -65,6 +75,19 @@ main (int argc, char **argv) : /* no output operands */ : "r" (data) : "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"); +#ifdef __x86_64__ + asm ("movaps 128(%0), %%xmm8\n\t" + "movaps 144(%0), %%xmm9\n\t" + "movaps 160(%0), %%xmm10\n\t" + "movaps 176(%0), %%xmm11\n\t" + "movaps 192(%0), %%xmm12\n\t" + "movaps 208(%0), %%xmm13\n\t" + "movaps 224(%0), %%xmm14\n\t" + "movaps 240(%0), %%xmm15\n\t" + : /* no output operands */ + : "r" (data) + : "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"); +#endif asm ("nop"); /* first breakpoint here */ @@ -80,6 +103,20 @@ main (int argc, char **argv) : /* no output operands */ : "r" (data) : "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"); +#ifdef __x86_64__ + asm ( + "movaps %%xmm8, 128(%0)\n\t" + "movaps %%xmm9, 144(%0)\n\t" + "movaps %%xmm10, 160(%0)\n\t" + "movaps %%xmm11, 176(%0)\n\t" + "movaps %%xmm12, 192(%0)\n\t" + "movaps %%xmm13, 208(%0)\n\t" + "movaps %%xmm14, 224(%0)\n\t" + "movaps %%xmm15, 240(%0)\n\t" + : /* no output operands */ + : "r" (data) + : "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"); +#endif puts ("Bye!"); /* second breakpoint here */ } Index: i386-sse.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-sse.exp,v retrieving revision 1.11 diff -u -p -r1.11 i386-sse.exp --- i386-sse.exp 3 Jan 2009 05:58:03 -0000 1.11 +++ i386-sse.exp 24 May 2009 18:57:38 -0000 @@ -25,8 +25,8 @@ if $tracelevel { set prms_id 0 set bug_id 0 -if ![istarget "i?86-*-*"] then { - verbose "Skipping i386 SSE tests." +if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } { + verbose "Skipping x86 SSE tests." return } @@ -79,7 +79,13 @@ gdb_test "break [gdb_get_line_number "fi "set first breakpoint in main" gdb_continue_to_breakpoint "continue to first breakpoint in main" -foreach r {0 1 2 3 4 5 6 7} { +if [istarget i?86-*-*] { + set nr_regs 8 +} else { + set nr_regs 16 +} + +for { set r 0 } { $r < $nr_regs } { incr r } { gdb_test "print \$xmm$r.v4_float" \ ".. = \\{$r, $r.25, $r.5, $r.75\\}.*" \ "check float contents of %xmm$r" @@ -88,7 +94,7 @@ foreach r {0 1 2 3 4 5 6 7} { "check int8 contents of %xmm$r" } -foreach r {0 1 2 3 4 5 6 7} { +for { set r 0 } { $r < $nr_regs } { incr r } { gdb_test "set var \$xmm$r.v4_float\[0\] = $r + 10" "" "set %xmm$r" } @@ -97,7 +103,7 @@ gdb_test "break [gdb_get_line_number "se "set second breakpoint in main" gdb_continue_to_breakpoint "continue to second breakpoint in main" -foreach r {0 1 2 3 4 5 6 7} { +for { set r 0 } { $r < $nr_regs } { incr r } { gdb_test "print data\[$r\]" \ ".. = \\{f = \\{[expr $r + 10], $r.25, $r.5, $r.75\\}\\}.*" \ "check contents of data\[$r\]"