From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23808 invoked by alias); 21 Jun 2017 07:43:53 -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 22993 invoked by uid 89); 21 Jun 2017 07:43:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=hello! X-HELO: mail-ua0-f195.google.com Received: from mail-ua0-f195.google.com (HELO mail-ua0-f195.google.com) (209.85.217.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Jun 2017 07:43:51 +0000 Received: by mail-ua0-f195.google.com with SMTP id z34so14391846uab.0 for ; Wed, 21 Jun 2017 00:43:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=eAQNTv1YffiRjmxQenb8OsF6jOO2Rsqmr/Uk4Jh+ZIw=; b=YOnFUMf4Fe8fS9I7wqqKElsej/VLE6+xa44Zz3Qmgf98qOvudov6wVOusSgOrO5yan ZGmSmVNcriaPEWrPgpDL/HX/slK9nCAyv8ipUK7XAHiV78cybOaVB6AVqs85hdZbrTku vIqM41z1Wt57Vm5/MrgT82QDkbJMCsfSLnSVZzrid6I21NCtaBR44ar9anrbLXSWDOJD JkRRHgk7od1rtsfAVnKgwCVJMF3l4YKCYP5/msT15+NQJf5oG4Enz3fETr5tBHD4vnZU +cYt+0V/6eVQB5aWEwk0DGvMs1D7PtgGnJPAW4JdzauHewGwk6MeBgEB5BEnCZrQmv6k xWEQ== X-Gm-Message-State: AKS2vOwsotCnIqEEpMvR9YutAwg1uE38RUlszcv5Rj6vePwvuAiujr9f 5zbMDk7uHZrdD5MDrXNWm0LWBnRnhWwG X-Received: by 10.176.9.72 with SMTP id c8mr9769105uah.145.1498031029211; Wed, 21 Jun 2017 00:43:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.69.29 with HTTP; Wed, 21 Jun 2017 00:43:48 -0700 (PDT) From: Uros Bizjak Date: Wed, 21 Jun 2017 07:43:00 -0000 Message-ID: Subject: Re: [i386] __builtin_ia32_stmxcsr could be pure To: "gcc-patches@gcc.gnu.org" Cc: Marc Glisse , Richard Guenther Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-06/txt/msg01539.txt.bz2 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. 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?). > > 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. OK. Thanks, Uros.