diff mbox

Small SH fix

Message ID 1288294147-32401-3-git-send-email-bonzini@gnu.org
State New
Headers show

Commit Message

Paolo Bonzini Oct. 28, 2010, 7:29 p.m. UTC
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.

Comments

Kaz Kojima Oct. 29, 2010, 4:06 a.m. UTC | #1
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
diff mbox

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