From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11023 invoked by alias); 29 Mar 2010 18:11:23 -0000 Received: (qmail 11001 invoked by uid 22791); 29 Mar 2010 18:11:22 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Mar 2010 18:11:16 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id D56C91C081; Mon, 29 Mar 2010 11:11:14 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost4.vmware.com (Postfix) with ESMTP id CB0F3C9A0C; Mon, 29 Mar 2010 11:11:14 -0700 (PDT) Message-ID: <4BB0ED42.70106@vmware.com> Date: Mon, 29 Mar 2010 18:11:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Hui Zhu CC: Joel Brobecker , gdb-patches ml Subject: Re: [RFA/i386] Prec x86 MMX 3DNow! SSE SSE2 SSE3 SSSE3 SSE4 support References: <4B2BDAEC.7090207@vmware.com> <20100109122833.GB2007@adacore.com> <4B4BD2AE.7030405@vmware.com> <4BB00522.1000603@vmware.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------040900090600020608060707" 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: 2010-03/txt/msg01015.txt.bz2 This is a multi-part message in MIME format. --------------040900090600020608060707 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 375 Hui Zhu wrote: > Hi Michael, > > I make a new testsuite that can support sse and sse4 better. > > When the pc doesn't support sse4 insn, the test will skip the sse4 insn test. > > Please help me review it. Hui, I found out that older versions of GAS require three arguments for blendvps and blendvpd -- and the first argument must be %xmm0. Try this on your machine: --------------040900090600020608060707 Content-Type: text/x-csrc; name="i386-sse-reverse.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="i386-sse-reverse.c" Content-length: 3172 /* This testcase is part of GDB, the GNU debugger. Copyright 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Architecture tests for intel i386 platform. */ void sse_test (void) { char buf0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; char buf1[] = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}; char buf2[] = {32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; asm ("movupd %0, %%xmm0":"=m"(buf0)); asm ("movupd %0, %%xmm1":"=m"(buf1)); asm ("movupd %0, %%xmm2":"=m"(buf2)); asm ("addpd %xmm0, %xmm1"); asm ("addps %xmm1, %xmm2"); asm ("addsd %xmm2, %xmm1"); asm ("addss %xmm1, %xmm0"); asm ("addsubpd %xmm0, %xmm2"); asm ("addsubps %xmm0, %xmm1"); asm ("andpd %xmm1, %xmm2"); asm ("andps %xmm2, %xmm1"); asm ("cmppd $3, %xmm0, %xmm1"); asm ("cmpps $4, %xmm1, %xmm2"); asm ("cmpsd $5, %xmm2, %xmm1"); asm ("cmpss $6, %xmm1, %xmm0"); asm ("comisd %xmm0, %xmm2"); asm ("comiss %xmm0, %xmm1"); asm ("cvtdq2pd %xmm1, %xmm2"); asm ("cvtdq2ps %xmm2, %xmm1"); asm ("cvtpd2dq %xmm1, %xmm0"); asm ("cvtpd2ps %xmm0, %xmm1"); asm ("divpd %xmm1, %xmm2"); asm ("divps %xmm2, %xmm1"); asm ("divsd %xmm1, %xmm0"); asm ("divss %xmm0, %xmm2"); asm ("mulpd %xmm0, %xmm1"); asm ("mulps %xmm1, %xmm2"); asm ("mulsd %xmm2, %xmm1"); asm ("mulss %xmm1, %xmm0"); asm ("orpd %xmm2, %xmm0"); asm ("orps %xmm0, %xmm1"); asm ("pabsb %xmm1, %xmm2"); asm ("pabsw %xmm2, %xmm1"); asm ("pabsd %xmm1, %xmm0"); asm ("packsswb %xmm0, %xmm2"); asm ("packssdw %xmm0, %xmm1"); asm ("ucomisd %xmm1, %xmm2"); asm ("ucomiss %xmm2, %xmm1"); asm ("unpckhpd %xmm1, %xmm0"); asm ("unpckhps %xmm2, %xmm0"); asm ("xorpd %xmm0, %xmm1"); asm ("xorps %xmm1, %xmm2"); } /* end sse_test */ void sse4_test (void) { char buf0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; char buf1[] = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}; char buf2[] = {32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; asm ("movupd %0, %%xmm0":"=m"(buf0)); asm ("movupd %0, %%xmm1":"=m"(buf1)); asm ("movupd %0, %%xmm2":"=m"(buf2)); asm ("blendpd $1, %xmm1, %xmm0"); asm ("blendps $2, %xmm2, %xmm0"); asm ("blendvpd %xmm0, %xmm1, %xmm2"); asm ("blendvps %xmm0, %xmm2, %xmm1"); } /* end sse4_test */ int main () { sse_test (); sse4_test (); return 0; /* end of main */ } --------------040900090600020608060707--