From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50914 invoked by alias); 5 Apr 2017 08:29:22 -0000 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 Received: (qmail 50817 invoked by uid 89); 5 Apr 2017 08:29:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Apr 2017 08:29:19 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C36CB804F4; Wed, 5 Apr 2017 08:29:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C36CB804F4 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C36CB804F4 Received: from tucnak.zalov.cz (ovpn-116-72.ams2.redhat.com [10.36.116.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6453B912A5; Wed, 5 Apr 2017 08:29:19 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v358TGvo029407; Wed, 5 Apr 2017 10:29:16 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v358TFnj029406; Wed, 5 Apr 2017 10:29:15 +0200 Date: Wed, 05 Apr 2017 08:29:00 -0000 From: Jakub Jelinek To: Uros Bizjak Cc: "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] Don't error about x86 return value in SSE reg (or x86 reg) or argument in SSE reg too early (PR target/80298) Message-ID: <20170405082915.GP17461@tucnak> Reply-To: Jakub Jelinek References: <20170404192447.GL17461@tucnak> <20170405080007.GN17461@tucnak> <20170405082014.GO17461@tucnak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg00204.txt.bz2 On Wed, Apr 05, 2017 at 10:26:47AM +0200, Uros Bizjak wrote: > On Wed, Apr 5, 2017 at 10:20 AM, Jakub Jelinek wrote: > > On Wed, Apr 05, 2017 at 10:12:02AM +0200, Uros Bizjak wrote: > >> Oh, I forgot to point out that on x86_64 ABI specifies MMX values in > >> SSE registers. > > > > I know it does. And if people have their own function that returns > > __m64 or takes such arguments, they surely have to. > > The question is only about the case when no function (in the assembly) > > returns in SSE registers nor gets arguments in them, when all the > > MMX code is inside of a function. > > With your patch, it is - the MMX intrinsics are functions and we error on > > them even when they are inlined. > > With my patch we count only the non-inlined functions, something we emit > > assembly for or call them from other TUs. > > > > If you think requiring SSE for MMX always in 64-bit code is fine, even > > when not strictly needed (as in, you really don't need SSE ISA to execute > > such code, although there are no CPUs without that HW), so be it, then > > let's go with your patch. > > Yes, I think that we should consistently warn even in case intrinsic > is inlined. I'm afraid that otherwise we will have endless stream of > bugreports that something warns with -O0, but not -O1+, when LTO is > used, etc, etc... The rule is: When user uses (or intends to use) MMX > value (that goes in SSE reg on x86_64), -msse is needed on x86_64, > otherwise warning is emitted. Well, error. Anyway, if so, then please commit your patch. Jakub