public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org
Subject: Re: Add subreg_memory_offset helper functions
Date: Mon, 04 Sep 2017 05:15:00 -0000	[thread overview]
Message-ID: <57b50ff0-7afd-9f4c-7179-836e9ca5a185@redhat.com> (raw)
In-Reply-To: <87shgct84a.fsf@linaro.org>

On 08/28/2017 02:21 AM, Richard Sandiford wrote:
> This patch adds routines for converting a SUBREG_BYTE offset into a
> memory address offset.  The two only differ for paradoxical subregs,
> where SUBREG_BYTE is always 0 but the memory address offset can be
> negative.
> 
> Tested on aarch64-linux-gnu and x86_64-linux-gnu, and by checking
> there was no change in the testsuite assembly output for at least
> one target per CPU.  OK to install?
> 
> Richard
> 
> 
> 2017-08-28  Richard Sandiford  <richard.sandiford@linaro.org>
> 	    Alan Hayward  <alan.hayward@arm.com>
> 	    David Sherwood  <david.sherwood@arm.com>
> 
> gcc/
> 	* rtl.h (subreg_memory_offset): Declare.
> 	* emit-rtl.c (subreg_memory_offset): New function.
> 	* expmed.c (store_bit_field_1): Use it.
> 	* expr.c (undefined_operand_subword_p): Likewise.
> 	* simplify-rtx.c (simplify_subreg): Likewise.
I hate reading though the subreg related stuff.  It just seems far too
easy to get wrong.  So while I applaud the refactoring, I hate doing the
review on it ;(

Anyway, this seems reasonable.  I didn't follow the mixed endianness
case as thoroughly as the others.  But I trust your judgment & testing.

jeff

      reply	other threads:[~2017-09-04  5:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28  8:57 Richard Sandiford
2017-09-04  5:15 ` Jeff Law [this message]

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=57b50ff0-7afd-9f4c-7179-836e9ca5a185@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.sandiford@linaro.org \
    /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).