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.sandif...@linaro.org> > Alan Hayward <alan.hayw...@arm.com> > David Sherwood <david.sherw...@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