From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113883 invoked by alias); 7 Jul 2015 12:37:38 -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 113816 invoked by uid 89); 7 Jul 2015 12:37:38 -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,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Jul 2015 12:37:36 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-21-l3cH8CVESUyT9wb1d9uNDA-1 Received: from [10.2.207.65] ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 7 Jul 2015 13:37:31 +0100 Message-ID: <559BC80B.4060608@arm.com> Date: Tue, 07 Jul 2015 12:37:00 -0000 From: Alan Lawrence User-Agent: Thunderbird 2.0.0.24 (X11/20101213) MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: Jakub Jelinek Subject: [PATCH 15/16][fold-const.c] Fix bigendian HFmode in native_interpret_real In-Reply-To: <559BC6EC.3000907@arm.com> X-MC-Unique: l3cH8CVESUyT9wb1d9uNDA-1 Content-Type: multipart/mixed; boundary="------------050802030602020604000208" X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00487.txt.bz2 This is a multi-part message in MIME format. --------------050802030602020604000208 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-length: 157 As per https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01346.html. Fixes FAIL= of=20 advsimd-intrinsics vcreate.c on aarch64_be-none-elf from previous patch. --------------050802030602020604000208 Content-Type: text/x-patch; name=15_native_interpret_real.patch Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="15_native_interpret_real.patch" Content-length: 792 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>=3D4 =20=20=20=20 (with missing space) diff --git a/gcc/fold-const.c b/gcc/fold-const.c index e61d946..15a10f0 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -7622,7 +7622,7 @@ native_interpret_real (tree type, const unsigned char= *ptr, int len) offset +=3D byte % UNITS_PER_WORD; } else - offset =3D BYTES_BIG_ENDIAN ? 3 - byte : byte; + offset =3D BYTES_BIG_ENDIAN ? MIN (3, total_bytes - 1) - byte : byte; value =3D ptr[offset + ((bitpos / BITS_PER_UNIT) & ~3)]; =20 tmp[bitpos / 32] |=3D (unsigned long)value << (bitpos & 31); --------------050802030602020604000208--