From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23560 invoked by alias); 23 Jul 2010 15:39:46 -0000 Received: (qmail 23551 invoked by uid 22791); 23 Jul 2010 15:39:46 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_AV,TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-vw0-f47.google.com (HELO mail-vw0-f47.google.com) (209.85.212.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Jul 2010 15:39:41 +0000 Received: by vws13 with SMTP id 13so362972vws.20 for ; Fri, 23 Jul 2010 08:39:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.168.10 with SMTP id s10mr1871453vcy.190.1279899579355; Fri, 23 Jul 2010 08:39:39 -0700 (PDT) Received: by 10.220.194.134 with HTTP; Fri, 23 Jul 2010 08:39:39 -0700 (PDT) In-Reply-To: References: Date: Fri, 23 Jul 2010 15:39:00 -0000 Message-ID: Subject: Re: [PATCH, i386]: Remove sse{,2} effective target check from compile-time tests From: "H.J. Lu" To: Uros Bizjak Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg01879.txt.bz2 On Fri, Jul 23, 2010 at 8:33 AM, Uros Bizjak wrote: > On Fri, Jul 23, 2010 at 5:25 PM, H.J. Lu wrote: > >>>>> a) gcc.target/i386: >>>>> >>>>> These tests are protected by sse{,2,...,n} and avx effective targets. >>>>> These effective targets tests check if the whole toolchain is able to >>>>> compile the test, but the real hardware/OS support will be checked by >>>>> the executable itself and will terminate early on targets that can't >>>>> execute all instructions. The benefit for this approach can be seen >>>>> for i.e. AVX tests. Using recent enough binutils, even if the hardware >>>>> can not support the execution, the test _can_ be compiled all the way >>>>> to the executable, so toolchain can be tested as far as possible. >>>>> >>>> >>>> If there is no hardware/OS support, do we still run those run-time tests >>>> or just skip them? >>> >>> We run them. >>> >> >> 2 issues if we still run those tests when there is no hardware/OS support: >> >> 1. Each test needs t do a run-time check. I don't see why we >> need the new proc to check hardware/OS support. >> 2. Passing those tests doesn't mean implementation is correct, >> encoding could be wrong or wrong instructions could be >> generated. > > These are IMO acceptable compromises with the rationale I outlined in > my previous post. If you have better implementation, please provide > patches, so we can discuss concrete benefits and drawbacks of your > approach. > First we have to decide when there is no hardware/OS support, do we want to run the run-time tests. If the answer is yes, we can use my first AVX run-time check patch is at http://gcc.gnu.org/ml/gcc-patches/2010-07/msg01791.html and add more run-time check if needed. If we don't want to run the run-time tests when there is no hardware/OS support, then we should start with: http://gcc.gnu.org/ml/gcc-patches/2010-07/msg01792.html -- H.J.