Message ID | AANLkTimYop-yQTkiG4r-rn0+-JZMT7Cj+C-din0vhEmT@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Wed, Mar 16, 2011 at 03:38:25PM -0700, H.J. Lu wrote: IMNSHO you really should reconsider using Pmode != ptr_mode for your port. That said, the patch looks good to me, though I can't approve it. > diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32 > index 764e3de..45db256 100644 > --- a/gcc/ChangeLog.x32 > +++ b/gcc/ChangeLog.x32 > @@ -1,5 +1,9 @@ > 2011-03-16 H.J. Lu <hongjiu.lu@intel.com> > > + * var-tracking.c (prepare_call_arguments): Check SUBREG. Just mention PR debug/48160 in the ChangeLog entry... > + > +2011-03-16 H.J. Lu <hongjiu.lu@intel.com> > + > PR rtl-optimization/48155 > * reload1.c (gen_reload): Check if XEXP (in, 0/1) is SUBREG of > REG in PLUS. > diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c > index 266f11f..cfa74a6 100644 > --- a/gcc/var-tracking.c > +++ b/gcc/var-tracking.c > @@ -5763,7 +5763,11 @@ prepare_call_arguments (basic_block bb, rtx insn) > > /* Try harder, when passing address of a constant > pool integer it can be easily read back. */ > - val = CSELIB_VAL_PTR (XEXP (item, 1)); > + item = XEXP (item, 1); > + if (GET_CODE (item) == SUBREG) > + item = SUBREG_REG (item); > + gcc_assert (GET_CODE (item) == VALUE); > + val = CSELIB_VAL_PTR (item); > for (l = val->locs; l; l = l->next) > if (GET_CODE (l->loc) == SYMBOL_REF > && TREE_CONSTANT_POOL_ADDRESS_P (l->loc) Jakub
On Wed, Mar 16, 2011 at 4:28 PM, Jakub Jelinek <jakub@redhat.com> wrote: > On Wed, Mar 16, 2011 at 03:38:25PM -0700, H.J. Lu wrote: > > IMNSHO you really should reconsider using Pmode != ptr_mode for your port. Someone can give it a try. My main concern is the x32 process is running in 64bit mode. Its stack operation is 64bit. > That said, the patch looks good to me, though I can't approve it. Richard, Jason, is this patch OK with PR debug/48160 in the ChangeLog entry.? >> diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32 >> index 764e3de..45db256 100644 >> --- a/gcc/ChangeLog.x32 >> +++ b/gcc/ChangeLog.x32 >> @@ -1,5 +1,9 @@ >> 2011-03-16 H.J. Lu <hongjiu.lu@intel.com> >> >> + * var-tracking.c (prepare_call_arguments): Check SUBREG. > > Just mention PR debug/48160 in the ChangeLog entry... > Done. Thanks.
diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32 index 764e3de..45db256 100644 --- a/gcc/ChangeLog.x32 +++ b/gcc/ChangeLog.x32 @@ -1,5 +1,9 @@ 2011-03-16 H.J. Lu <hongjiu.lu@intel.com> + * var-tracking.c (prepare_call_arguments): Check SUBREG. + +2011-03-16 H.J. Lu <hongjiu.lu@intel.com> + PR rtl-optimization/48155 * reload1.c (gen_reload): Check if XEXP (in, 0/1) is SUBREG of REG in PLUS. diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 266f11f..cfa74a6 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -5763,7 +5763,11 @@ prepare_call_arguments (basic_block bb, rtx insn) /* Try harder, when passing address of a constant pool integer it can be easily read back. */ - val = CSELIB_VAL_PTR (XEXP (item, 1)); + item = XEXP (item, 1); + if (GET_CODE (item) == SUBREG) + item = SUBREG_REG (item); + gcc_assert (GET_CODE (item) == VALUE); + val = CSELIB_VAL_PTR (item); for (l = val->locs; l; l = l->next) if (GET_CODE (l->loc) == SYMBOL_REF && TREE_CONSTANT_POOL_ADDRESS_P (l->loc)