This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add subreg_memory_offset helper functions
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at linaro dot org
- Date: Sun, 3 Sep 2017 23:15:16 -0600
- Subject: Re: Add subreg_memory_offset helper functions
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DBBAC80468
- References: <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