This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Move targetm.units_per_simd_word to largest_simd_mode


> Index: trunk/gcc/config/sparc/sparc.c
> ===================================================================
> *** trunk.orig/gcc/config/sparc/sparc.c	2010-10-05 17:42:07.000000000 +0200
> --- trunk/gcc/config/sparc/sparc.c	2010-10-05 17:53:48.000000000 +0200
> *************** static bool sparc_can_eliminate (const i
> *** 435,441 ****
>   static const char *sparc_mangle_type (const_tree);
>   #endif
>   static void sparc_trampoline_init (rtx, tree, rtx);
> ! static unsigned int sparc_units_per_simd_word (enum machine_mode);
>   
>   #ifdef SUBTARGET_ATTRIBUTE_TABLE
>   /* Table of valid machine attributes.  */
> --- 435,441 ----
>   static const char *sparc_mangle_type (const_tree);
>   #endif
>   static void sparc_trampoline_init (rtx, tree, rtx);
> ! static unsigned int sparc_largest_simd_mode (enum machine_mode);
>   
>   #ifdef SUBTARGET_ATTRIBUTE_TABLE
>   /* Table of valid machine attributes.  */

enum machine_mode

> *************** sparc_vector_mode_supported_p (enum mach
> *** 6244,6255 ****
>     return TARGET_VIS && VECTOR_MODE_P (mode) ? true : false;
>   }
>   
> ! /* Implement the TARGET_VECTORIZE_UNITS_PER_SIMD_WORD target hook.  */
>
> ! static unsigned int
> ! sparc_units_per_simd_word (enum machine_mode mode ATTRIBUTE_UNUSED)
>   {
> !   return TARGET_VIS ? 8 : UNITS_PER_WORD;
>   }
>   
>   /* Return the string to output an unconditional branch to LABEL, which is
> --- 6244,6270 ----
>     return TARGET_VIS && VECTOR_MODE_P (mode) ? true : false;
>   }
>   
> ! /* Implement the TARGET_VECTORIZE_LARGEST_SIMD_MODE target hook.  */
>
> ! static enum machine_mode
> ! sparc_largest_simd_mode (enum machine_mode mode)
>   {
> !   if (TARGET_VIS)
> !     switch (mode)
> !       {
> !       case SFmode:
> ! 	return V2SFmode;
> !       case SImode:
> ! 	return V2SImode;
> !       case HImode:
> ! 	return V4HImode;
> !       case QImode:
> ! 	return V8QImode;
> !
> !       default:;
> !       }
> !
> !   return word_mode;
>   }
>   
>   /* Return the string to output an unconditional branch to LABEL, which is

SPARC doesn't support floating-point vector modes.  sparc-modes.def reads:

/* Vector modes.  */
VECTOR_MODES (INT, 8);        /*       V8QI V4HI V2SI */
VECTOR_MODES (INT, 4);        /*       V4QI V2HI */

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]