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 7/7] always define WORD_REGISTER_OPERATIONS


Hi Trevor,

On Mon, Jul 06, 2015 at 08:11:30AM -0400, tbsaunde+gcc@tbsaunde.org wrote:
> 	* defaults.h: Provide default for WORD_REGISTER_OPERATIONS.
> 	* config/alpha/alpha.h: Define WORD_REGISTER_OPERATIONS to 1.
> 	* config/arc/arc.h: Likewise.
> 	* config/arm/arm.h: Likewise.
> 	* config/bfin/bfin.h: Likewise.
> 	* config/epiphany/epiphany.h: Likewise.
> 	* config/frv/frv.h: Likewise.
> 	* config/ia64/ia64.h: Likewise.
> 	* config/iq2000/iq2000.h: Likewise.
> 	* config/lm32/lm32.h: Likewise.
> 	* config/m32r/m32r.h: Likewise.
> 	* config/mcore/mcore.h: Likewise.
> 	* config/mep/mep.h: Likewise.
> 	* config/microblaze/microblaze.h: Likewise.
> 	* config/mips/mips.h: Likewise.
> 			* config/mmix/mmix.h:
> 				* config/mn10300/mn10300.h:
> 			* config/nds32/nds32.h:
> 			* config/nios2/nios2.h:
> 			* config/pa/pa.h:
> 			* config/rl78/rl78.h:
> 			* config/sh/sh.h:
> 			* config/sparc/sparc.h:
> 			* config/stormy16/stormy16.h (enum reg_class):
> 			* config/tilegx/tilegx.h:
> 			* config/tilepro/tilepro.h:
> 			* config/v850/v850.h:
> 			* config/xtensa/xtensa.h:
> 		* doc/tm.texi: Regenerate.

Something went wrong here ;-)

> @@ -12072,10 +12071,9 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
>  		     they no longer have defined values and the meaning of
>  		     the code has been changed.  */
>  		  && (0
> -#ifdef WORD_REGISTER_OPERATIONS
> -		      || (mode_width > GET_MODE_PRECISION (tmode)
> +		      || (!WORD_REGISTER_OPERATIONS
> +			  && mode_width > GET_MODE_PRECISION (tmode)
>  			  && mode_width <= BITS_PER_WORD)
> -#endif
>  		      || (mode_width <= GET_MODE_PRECISION (tmode)
>  			  && subreg_lowpart_p (XEXP (op0, 0))))
>  		  && CONST_INT_P (XEXP (op0, 1))

Please get rid of that "0 ||" now.

I think the ! is wrong here?

The rest of the combine changes look good.

> @@ -6114,13 +6112,12 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
>  					 highest_pow2_factor (offset));
>  	      }
>  
> -#ifdef WORD_REGISTER_OPERATIONS
>  	    /* If this initializes a field that is smaller than a
>  	       word, at the start of a word, try to widen it to a full
>  	       word.  This special case allows us to output C++ member
>  	       function initializations in a form that the optimizers
>  	       can understand.  */
> -	    if (REG_P (target)
> +	    if (WORD_REGISTER_OPERATIONS && REG_P (target)
>  		&& bitsize < BITS_PER_WORD
>  		&& bitpos % BITS_PER_WORD == 0
>  		&& GET_MODE_CLASS (mode) == MODE_INT

Put that first && on a new line as well?  Similar many times more.


Segher


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