This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [sh] fix sp_switch attribute


DJ Delorie <dj@redhat.com> wrote:
> This patch switches to using an unspec_volatile to keep things around,
> and uses the constant pool to save the address of the new stack
> pointer.
> 
> Ok to apply?
> 
> 	* config/sh/sh.md (UNSPECV_SP_SWITCH_B): New.
> 	(UNSPECV_SP_SWITCH_E): New.
> 	(sp_switch_1): Change to an unspec.
> 	(sp_switch_2): Change to an unspec.  Don't use post-inc when we
> 	replace $r15.
> 	* config/sh/sh.c (sh_expand_prologue): Use the constant pool to
> 	reference the new stack's address

Thanks for looking into this issue.

> +	= ggc_strdup (TREE_STRING_POINTER (TREE_VALUE ( TREE_VALUE (sp_switch_attr))));

Could you please replace this with

      tree arg = TREE_VALUE (TREE_VALUE (sp_switch_attr));
      const char *s = ggc_strdup (TREE_STRING_POINTER (arg));

or some such lines to avoid 80 column overflow?
I assume that the patch is tested on an appropriate sh target.
OK with the above change.

Regards,
	kaz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]