Hello,

This patch replaces usages of CONST_OK_FOR_I06 with
satisfies_constraint_I06 and moves the CONST_OK_FOR_I10 macro to sh.c.
Tested with 'make all-gcc'.

OK?

Cheers,
Oleg

ChangeLog:

        * config/sh/sh.h (CONST_OK_FOR_I06): Delete.
        (CONST_OK_FOR_I10): Move macro to ...
        * config/sh/sh.c: ... here.
        (sh_legitimate_index_p): Use satisfies_constraint_I06
        instead of CONST_OK_FOR_I06.
Index: gcc/config/sh/sh.c
===================================================================
--- gcc/config/sh/sh.c	(revision 189427)
+++ gcc/config/sh/sh.c	(working copy)
@@ -63,6 +63,9 @@
 #define LSW (TARGET_LITTLE_ENDIAN ? 0 : 1)
 
 /* These are some macros to abstract register modes.  */
+#define CONST_OK_FOR_I10(VALUE) (((HOST_WIDE_INT)(VALUE)) >= -512 \
+				 && ((HOST_WIDE_INT)(VALUE)) <= 511)
+
 #define CONST_OK_FOR_ADD(size) \
   (TARGET_SHMEDIA ? CONST_OK_FOR_I10 (size) : CONST_OK_FOR_I08 (size))
 #define GEN_MOV (*(TARGET_SHMEDIA64 ? gen_movdi : gen_movsi))
@@ -9776,7 +9779,7 @@
 
       /* Check if this is the address of an unaligned load / store.  */
       if (mode == VOIDmode)
-	return CONST_OK_FOR_I06 (INTVAL (op));
+	return satisfies_constraint_I06 (op);
 
       size = GET_MODE_SIZE (mode);
       return (!(INTVAL (op) & (size - 1))
Index: gcc/config/sh/sh.h
===================================================================
--- gcc/config/sh/sh.h	(revision 189427)
+++ gcc/config/sh/sh.h	(working copy)
@@ -1213,12 +1213,8 @@
 
 /* Defines for sh.md and constraints.md.  */
 
-#define CONST_OK_FOR_I06(VALUE) (((HOST_WIDE_INT)(VALUE)) >= -32 \
-				 && ((HOST_WIDE_INT)(VALUE)) <= 31)
 #define CONST_OK_FOR_I08(VALUE) (((HOST_WIDE_INT)(VALUE))>= -128 \
 				 && ((HOST_WIDE_INT)(VALUE)) <= 127)
-#define CONST_OK_FOR_I10(VALUE) (((HOST_WIDE_INT)(VALUE)) >= -512 \
-				 && ((HOST_WIDE_INT)(VALUE)) <= 511)
 #define CONST_OK_FOR_I16(VALUE) (((HOST_WIDE_INT)(VALUE)) >= -32768 \
 				 && ((HOST_WIDE_INT)(VALUE)) <= 32767)
 

Reply via email to