From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71148 invoked by alias); 9 Jul 2015 02:20:45 -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 71125 invoked by uid 89); 9 Jul 2015 02:20:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 09 Jul 2015 02:20:38 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 3CA7337C381; Thu, 9 Jul 2015 02:20:37 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-49.phx2.redhat.com [10.3.113.49]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t692KZSb025509; Wed, 8 Jul 2015 22:20:35 -0400 Message-ID: <559DDA8C.3080401@redhat.com> Date: Thu, 09 Jul 2015 02:20:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Richard Biener CC: Alan Lawrence , "gcc-patches@gcc.gnu.org" , Jakub Jelinek Subject: Re: [PATCH 15/16][fold-const.c] Fix bigendian HFmode in native_interpret_real References: <559BC80B.4060608@arm.com> <559C4D89.3080407@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00667.txt.bz2 On 07/08/2015 03:43 AM, Richard Biener wrote: > On Wed, Jul 8, 2015 at 12:07 AM, Jeff Law wrote: >> On 07/07/2015 06:37 AM, Alan Lawrence wrote: >>> >>> As per https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01346.html. Fixes >>> FAIL of advsimd-intrinsics vcreate.c on aarch64_be-none-elf from >>> previous patch. >>> >>> 15_native_interpret_real.patch >>> >>> >>> commit e2e7ca148960a82fc88128820f17e7cbd14173cb >>> Author: Alan Lawrence >>> Date: Thu Apr 9 10:54:40 2015 +0100 >>> >>> Fix native_interpret_real for HFmode floats on Bigendian with >>> UNITS_PER_WORD>=4 >>> >>> (with missing space) >> >> OK with ChangeLog in proper form. > > Err - but now offset can become negative? Shouldn't it rather error out > before as it requires at least 4 bytes for big-endian? I managed to convince myself the value wouldn't be negative when reviewing. > > That said - the whole thing looks it doesn't expect GET_MODE_SIZE < 4 > and your "fix" is just very obfuscated (if it really is a fix). While I couldn't convince myself the function as a whole was prepared for smaller objects, I don't think Alan's patch made things worse. One could argue the whole bloody thing ought to be rewritten though. I'd also managed to convince myself the other instances of "3" weren't problematical. jeff