diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index c2e81b44cc2..6309a38ca41 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -1589,5 +1589,13 @@ extern int pragma_interrupt; /* ??? Define ADJUST_COSTS? */ +/* Since the SH architecture lacks negative address offsets, + the givs should be sorted smallest to largest so combine_givs + has maximum opportunity to combine givs. */ +#define GIV_SORT_CRITERION(X, Y) \ + if (GET_CODE ((X)->add_val) == CONST_INT \ + && GET_CODE ((Y)->add_val) == CONST_INT) \ + return INTVAL ((X)->add_val) - INTVAL ((Y)->add_val); + /* For the sake of libgcc2.c, indicate target supports atexit. */ #define HAVE_ATEXIT