From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2468 invoked by alias); 20 Jun 2017 21:34:36 -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 2423 invoked by uid 89); 20 Jun 2017 21:34:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=namely X-HELO: mail2-relais-roc.national.inria.fr Received: from mail2-relais-roc.national.inria.fr (HELO mail2-relais-roc.national.inria.fr) (192.134.164.83) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Jun 2017 21:34:34 +0000 Received: from 91.70.140.77.rev.sfr.net (HELO stedding) ([77.140.70.91]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2017 23:34:31 +0200 Date: Tue, 20 Jun 2017 21:34:00 -0000 From: Marc Glisse To: GCC Patches Subject: Re: [i386] __builtin_ia32_stmxcsr could be pure In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-SW-Source: 2017-06/txt/msg01518.txt.bz2 Ping. On Sat, 3 Jun 2017, Marc Glisse wrote: > Hello, > > I don't think Richard's "sounds good" was meant as "ok to commit". Does an > x86 maintainer want to approve or criticize the patch? > > https://gcc.gnu.org/ml/gcc-patches/2017-05/msg02009.html > > On Fri, 26 May 2017, Richard Biener wrote: > >> On Fri, May 26, 2017 at 10:55 AM, Marc Glisse wrote: >>> Hello, >>> >>> glibc marks fegetround as a pure function. On x86, people tend to use >>> _MM_GET_ROUNDING_MODE instead, which could benefit from the same. I think >>> it >>> is safe, but a second opinion would be welcome. >> >> Sounds good. The important part is to keep the dependency to >> SET_ROUNDING_MODE >> which is done via claiming both touch global memory. >> >>> I could have handled just this builtin, but it seemed better to provide >>> def_builtin_pure (like "const" already has) since there should be other >>> builtins that can be marked this way (maybe the gathers?). >> >> Should work for gathers. They could even use stronger guarantees, >> namely a fnspec with "..R" (the pointer argument is only read from >> directly). >> Similarly scatter can use ".W" (the pointer argument is only written to >> directly). >> >> Richard. >> >>> Bootstrap+testsuite on x86_64-pc-linux-gnu with default languages. >>> >>> 2017-05-29 Marc Glisse >>> >>> gcc/ >>> * config/i386/i386.c (struct builtin_isa): New field pure_p. >>> Reorder for compactness. >>> (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p. >>> (def_builtin_pure, def_builtin_pure2): New functions. >>> (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as >>> pure. >>> >>> gcc/testsuite/ >>> * gcc.target/i386/getround.c: New file. >>> >>> -- >>> Marc Glisse >> > > -- Marc Glisse