On Tue, Sep 27, 2011 at 4:36 AM, Jiangning Liu <jiangning....@arm.com> wrote:
> Fix a typo and CC x86/rs6000/arm ports maintainers.
>
> ChangeLog:
>
>        * config/i386/i386.c (ix86_stack_using_red_zone): Change inline
>        to be extern.
>        (TARGET_STACK_USING_RED_ZONE): New.
>        * config/rs6000/rs6000.c (rs6000_stack_using_red_zone): New.
>        (TARGET_STACK_USING_RED_ZONE): New.
>        (offset_below_red_zone_p): Change to use new hook
>        TARGET_STACK_USING_RED_ZONE.
>        * doc/tm.texi (TARGET_STACK_USING_RED_ZONE): New.
>        * doc/tm.texi.in (TARGET_STACK_USING_RED_ZONE): New.
>        * sched-deps.c (sched_analyze_1): If the stack pointer is being
>        modified and stack red zone is not supported for ports, flush out
>        all memory references as they may become invalid if moved across
>        the stack adjustment.
>        * target.def (stack_using_red_zone): New.
>        * testsuite/gcc.target/arm/stack-red-zone.c: New.
>
> Thanks,
> -Jiangning
>
> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
> index ff8c49f..1c16391 100644
> --- a/gcc/config/i386/i386.c
> +++ b/gcc/config/i386/i386.c
> @@ -2631,7 +2631,7 @@ static const char *const
> cpu_names[TARGET_CPU_DEFAULT_max] =
>
>
>  /* Return true if a red-zone is in use.  */
>
> -static inline bool
> +extern bool

static bool

>  ix86_using_red_zone (void)
>  {
>   return TARGET_RED_ZONE && !TARGET_64BIT_MS_ABI;
> @@ -35958,6 +35958,9 @@ ix86_autovectorize_vector_sizes (void)
>  #define TARGET_STACK_PROTECT_FAIL ix86_stack_protect_fail
>  #endif
>
> +#undef TARGET_STACK_USING_RED_ZONE
> +#define TARGET_STACK_USING_RED_ZONE ix86_using_red_zone
> +
>  #undef TARGET_FUNCTION_VALUE
>  #define TARGET_FUNCTION_VALUE ix86_function_value
>
> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
> index 1ab57e5..411cb09 100644
> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -1537,6 +1537,9 @@ static const struct attribute_spec
> rs6000_attribute_table[] =
>  #define TARGET_STACK_PROTECT_FAIL rs6000_stack_protect_fail
>  #endif
>
> +#undef TARGET_STACK_USING_RED_ZONE
> +#define TARGET_STACK_USING_RED_ZONE rs6000_stack_using_red_zone
> +
>  /* MPC604EUM 3.5.2 Weak Consistency between Multiple Processors
>    The PowerPC architecture requires only weak consistency among
>    processors--that is, memory accesses between processors need not be
> @@ -20660,6 +20663,13 @@ rs6000_restore_saved_cr (rtx reg, int
> using_mfcr_multiple)
>        }
>  }
>
> +/* Return true if the ABI allows red zone access.  */
> +extern bool

static bool

> +rs6000_stack_using_red_zone (void)
> +{
> +   return (DEFAULT_ABI != ABI_V4);
> +}
> +

Uros.

Reply via email to