Patchwork Small SH fix

login
register
mail settings
Submitter Paolo Bonzini
Date Oct. 28, 2010, 7:29 p.m.
Message ID <1288294147-32401-3-git-send-email-bonzini@gnu.org>
Download mbox | patch
Permalink /patch/69491/
State New
Headers show

Comments

Paolo Bonzini - Oct. 28, 2010, 7:29 p.m.
I found this by inspection; I haven't tested it but it is obviously
the right thing to do here to handle for_return == 2.
Kaz Kojima - Oct. 29, 2010, 4:06 a.m.
Paolo Bonzini <bonzini@gnu.org> wrote:
> I found this by inspection; I haven't tested it but it is obviously
> the right thing to do here to handle for_return == 2.
> 
> Index: gcc/config/sh/sh.c
> ===================================================================
> --- gcc/config/sh/sh.c	(branch diag)
> +++ gcc/config/sh/sh.c	(working copy)
> @@ -8149,12 +8149,13 @@ sh_dwarf_register_span (rtx reg)
>  static enum machine_mode
>  sh_promote_function_mode (const_tree type, enum machine_mode mode,
>  			  int *punsignedp, const_tree funtype,
> -			  int for_return ATTRIBUTE_UNUSED)
> +			  int for_return)
>  {
>    if (sh_promote_prototypes (funtype))
>      return promote_mode (type, mode, punsignedp);
>    else
> -    return mode;
> +    return default_promote_function_mode (type, mode, punsignedp, funtype,
> +					  for_return);
>  }
>  
>  static bool


Ah, yet another "why did it work previously".
Ok with ChangeLog entry.  Thanks for finding this!

Regards,
	kaz

Patch

Index: gcc/config/sh/sh.c
===================================================================
--- gcc/config/sh/sh.c	(branch diag)
+++ gcc/config/sh/sh.c	(working copy)
@@ -8149,12 +8149,13 @@  sh_dwarf_register_span (rtx reg)
 static enum machine_mode
 sh_promote_function_mode (const_tree type, enum machine_mode mode,
 			  int *punsignedp, const_tree funtype,
-			  int for_return ATTRIBUTE_UNUSED)
+			  int for_return)
 {
   if (sh_promote_prototypes (funtype))
     return promote_mode (type, mode, punsignedp);
   else
-    return mode;
+    return default_promote_function_mode (type, mode, punsignedp, funtype,
+					  for_return);
 }
 
 static bool