public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Alan Lawrence <alan.lawrence@arm.com>,
	       "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	       Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH 15/16][fold-const.c] Fix bigendian HFmode in native_interpret_real
Date: Thu, 09 Jul 2015 02:20:00 -0000	[thread overview]
Message-ID: <559DDA8C.3080401@redhat.com> (raw)
In-Reply-To: <CAFiYyc028tOWCsaO_iZH++rW+33t-Wrwb4EzPqvOs6SGiF=O9g@mail.gmail.com>

On 07/08/2015 03:43 AM, Richard Biener wrote:
> On Wed, Jul 8, 2015 at 12:07 AM, Jeff Law <law@redhat.com> 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<alan.lawrence@arm.com>
>>> 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

  parent reply	other threads:[~2015-07-09  2:20 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07 12:32 [PATCH 0/16][ARM/AArch64] Float16_t support, v2 Alan Lawrence
2015-07-07 12:34 ` [PATCH 4/16][ARM] Add float16x8_t type Alan Lawrence
2015-07-07 12:34 ` [PATCH 2/16][ARM] PR/63870 Add __builtin_arm_lane_check Alan Lawrence
2015-07-27 14:30   ` Kyrill Tkachov
2015-07-27 16:01     ` Alan Lawrence
2015-07-07 12:34 ` [PATCH 1/16][ARM] PR/63870 Add qualifier to check lane bounds in expand Alan Lawrence
2015-07-27 14:33   ` Kyrill Tkachov
2015-07-07 12:34 ` [PATCH 3/16][ARM] Add float16x4_t intrinsics Alan Lawrence
2015-07-07 13:09   ` Kyrill Tkachov
2015-07-07 16:22     ` Kyrill Tkachov
2015-07-07 16:34       ` Alan Lawrence
2015-07-07 16:52         ` Kyrill Tkachov
2015-07-07 17:17           ` Alan Lawrence
2015-07-08  8:35             ` Ramana Radhakrishnan
2015-07-27 13:22               ` Alan Lawrence
2015-07-07 12:35 ` [PATCH 6/16][ARM] Remaining float16 intrinsics: vld..., vst..., vget_low/high, vcombine Alan Lawrence
2015-07-07 12:35 ` [PATCH 7/16][AArch64] Add basic fp16 support Alan Lawrence
2015-07-07 12:35 ` [PATCH 5/16][ARM] Add float16x8_t intrinsics Alan Lawrence
2015-07-07 12:36 ` [PATCH 11/16][AArch64] Implement vcvt_{,high_}f16_f32 Alan Lawrence
2015-07-07 12:36 ` [PATCH 8/16][ARM/AArch64 Testsuite] Add basic fp16 tests Alan Lawrence
2015-07-07 12:36 ` [PATCH 9/16][AArch64] Add support for float16x{4,8}_t vectors/builtins Alan Lawrence
2015-07-07 12:36 ` [PATCH 10/16][AArch64] vld{2,3,4}{,_lane,_dup},vcombine,vcreate Alan Lawrence
2015-07-07 12:37 ` [PATCH 13/16][AArch64] Add vcvt(_high)?_f32_f16 intrinsics, with BE RTL fix Alan Lawrence
2015-07-07 12:37 ` [PATCH 15/16][fold-const.c] Fix bigendian HFmode in native_interpret_real Alan Lawrence
2015-07-07 22:06   ` Jeff Law
2015-07-08  9:43     ` Richard Biener
2015-07-08 10:51       ` Alan Lawrence
2015-07-08 12:44         ` Richard Biener
2015-07-09  2:20       ` Jeff Law [this message]
2015-07-09  9:34         ` Alan Lawrence
2015-07-09  9:48           ` Richard Biener
2015-07-09  9:56             ` Alan Lawrence
2015-07-07 12:37 ` [PATCH 12/16][AArch64] vreinterpret(q?), vget_(low|high), vld1(q?)_dup Alan Lawrence
2015-07-07 12:38 ` [PATCH 14/16][ARM/AArch64 testsuite] Update advsimd-intrinsics tests to add float16 vectors Alan Lawrence
2015-07-07 12:39 ` [PATCH 16/16][ARM/AArch64 Testsuite] Add test of vcvt{,_high}_{f16_f32,f32_f16} Alan Lawrence

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=559DDA8C.3080401@redhat.com \
    --to=law@redhat.com \
    --cc=alan.lawrence@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).