From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23796 invoked by alias); 1 Aug 2014 15:31:18 -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 23777 invoked by uid 89); 1 Aug 2014 15:31:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 Aug 2014 15:31:15 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1XDEnX-0000p8-Go from joseph_myers@mentor.com ; Fri, 01 Aug 2014 08:31:11 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 1 Aug 2014 08:31:11 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Fri, 1 Aug 2014 16:31:10 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1XDEnU-00040j-G2; Fri, 01 Aug 2014 15:31:08 +0000 Date: Fri, 01 Aug 2014 15:31:00 -0000 From: "Joseph S. Myers" To: David Edelsohn CC: Adhemerval Zanella , Richard Henderson , GCC Patches Subject: Re: [PATCH] PowerPC: Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2014-08/txt/msg00081.txt.bz2 On Thu, 31 Jul 2014, David Edelsohn wrote: > Thanks for implementing the FENV support. The patch generally looks > good to me. > > My one concern is a detail in the implementation of "update". I do not > have enough experience with GENERIC to verify the details and it seems > like it is missing building an outer COMPOUND_EXPR containing > update_mffs and the CALL_EXPR for update mtfsf. I suppose what's actually odd there is that you have + tree update_mffs = build2 (MODIFY_EXPR, void_type_node, old_fenv, call_mffs); + + tree old_llu = build1 (VIEW_CONVERT_EXPR, uint64_type_node, update_mffs); so you build a MODIFY_EXPR in void_type_node but then convert it with a VIEW_CONVERT_EXPR. If you'd built the MODIFY_EXPR in double_type_node then the VIEW_CONVERT_EXPR would be meaningful (the value of an assignment a = b being the new value of a), but reinterpreting a void value doesn't make sense. Or you could probably just use call_mffs directly in the VIEW_CONVERT_EXPR without explicitly creating the old_fenv variable. -- Joseph S. Myers joseph@codesourcery.com