avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] [M32R] Hookize GO_IF_MODE_DEPENDENT_ADDRESS


From: Weddington, Eric
Subject: RE: [avr-gcc-list] [M32R] Hookize GO_IF_MODE_DEPENDENT_ADDRESS
Date: Wed, 8 Sep 2010 13:33:06 -0600

Hi Anatoly,

I think you have the wrong mailing list here. You sent this to avr-gcc-list, 
when it should probably go to gcc-patches. ;-)

Eric Weddington

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Anatoly Sokolov
> Sent: Wednesday, September 08, 2010 12:59 PM
> To: address@hidden
> Cc: address@hidden
> Subject: [avr-gcc-list] [M32R] Hookize GO_IF_MODE_DEPENDENT_ADDRESS
> 
> 
>    Hi.
> 
>   This patch removes obsolete GO_IF_MODE_DEPENDENT_ADDRESS 
> macro from the
> M32R back end in the GCC and introduces equivalent
> TARGET_MODE_DEPENDENT_ADDRESS_P target hook.
> 
> 
>   Regression tested on m32r-unknown-elf.
> 
>   OK to install?
> 
>         * config/m32r/m32r.c (m32r_mode_dependent_address_p): 
> New functions.
>         (TARGET_MODE_DEPENDENT_ADDRESS_P): Define.
>         * config/m32r/m32r.h: (GO_IF_MODE_DEPENDENT_ADDRESS): Remove.
> 
> Index: gcc/config/m32r/m32r.c
> ===================================================================
> --- gcc/config/m32r/m32r.c      (revision 164002)
> +++ gcc/config/m32r/m32r.c      (working copy)
> @@ -67,6 +67,7 @@
>  static void  block_move_call (rtx, rtx, rtx);
>  static int   m32r_is_insn (rtx);
>  static rtx   m32r_legitimize_address (rtx, rtx, enum machine_mode);
> +static bool  m32r_mode_dependent_address_p (const_rtx);
>  static tree  m32r_handle_model_attribute (tree *, tree, 
> tree, int, bool *);
>  static void  m32r_print_operand (FILE *, rtx, int);
>  static void  m32r_print_operand_address (FILE *, rtx);
> @@ -117,6 +118,8 @@
>  
>  #undef TARGET_LEGITIMIZE_ADDRESS
>  #define TARGET_LEGITIMIZE_ADDRESS m32r_legitimize_address
> +#undef TARGET_MODE_DEPENDENT_ADDRESS_P
> +#define TARGET_MODE_DEPENDENT_ADDRESS_P m32r_mode_dependent_address_p
>  
>  #undef  TARGET_ASM_ALIGNED_HI_OP
>  #define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
> @@ -2043,6 +2046,17 @@
>    else
>      return x;
>  }
> +
> +/* Worker function for TARGET_MODE_DEPENDENT_ADDRESS_P.  */
> +
> +static bool
> +m32r_mode_dependent_address_p (const_rtx addr)
> +{
> +  if (GET_CODE (addr) == LO_SUM)
> +    return true;
> +
> +  return false;
> +}
>  > 
>  /* Nested function support.  */
>  
> Index: gcc/config/m32r/m32r.h
> ===================================================================
> --- gcc/config/m32r/m32r.h      (revision 164002)
> +++ gcc/config/m32r/m32r.h      (working copy)
> @@ -1048,16 +1048,6 @@
>         goto ADDR;                                              \
>      }                                                          \
>    while (0)
> -
> -/* Go to LABEL if ADDR (a legitimate address expression)
> -   has an effect that depends on the machine mode it is used for.  */
> -#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)              \
> -  do                                                           \
> -    {                                                          \
> -      if (GET_CODE (ADDR) == LO_SUM)                           \
> -       goto LABEL;                                             \
> -    }                                                          \
> -  while (0)
>  > 
>  /* Condition code usage.  */
>  
> 
> Anatoly.
> 
> 
> _______________________________________________
> AVR-GCC-list mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]