Alan Modra <amo...@gmail.com> writes:

> diff --git a/gcc/go/gospec.c b/gcc/go/gospec.c
> index ca3c2d7..fbb55be 100644
> --- a/gcc/go/gospec.c
> +++ b/gcc/go/gospec.c
> @@ -120,8 +120,10 @@ lang_specific_driver (struct cl_decoded_option 
> **in_decoded_options,
>    /* Whether the -S option was used.  */
>    bool saw_opt_S = false;
>  
> -  /* Whether the -m32 option was used. */
> -  bool saw_opt_m32 ATTRIBUTE_UNUSED = false;
> +#ifdef TARGET_CAN_SPLIT_STACK_64BIT
> +  /* Whether the -m64 option is in force. */
> +  bool is_m64 = TARGET_CAN_SPLIT_STACK_64BIT;
> +#endif
>  
>    /* The first input file with an extension of .go.  */
>    const char *first_go_file = NULL;  
> @@ -160,7 +162,11 @@ lang_specific_driver (struct cl_decoded_option 
> **in_decoded_options,
>  
>  #ifdef TARGET_CAN_SPLIT_STACK_64BIT
>       case OPT_m32:
> -       saw_opt_m32 = true;
> +       is_m64 = false;
> +       break;
> +
> +     case OPT_m64:
> +       is_m64 = true;
>         break;
>  #endif
>  
> @@ -253,7 +259,7 @@ lang_specific_driver (struct cl_decoded_option 
> **in_decoded_options,
>  #endif
>  
>  #ifdef TARGET_CAN_SPLIT_STACK_64BIT
> -  if (!saw_opt_m32)
> +  if (is_m64)
>      supports_split_stack = 1;
>  #endif

Please remind me why this logic isn't implemented as a target hook.

supports_split_stack = TARGET_CAN_SPLIT_STACK;

/* rs6000.h */
#define TARGET_CAN_SPLIT_STACK TARGET_64BIT

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Reply via email to