(GIV_SORT_CRITERION): Define.
authorJim Wilson <wilson@gcc.gnu.org>
Thu, 4 Apr 1996 20:12:59 +0000 (12:12 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 4 Apr 1996 20:12:59 +0000 (12:12 -0800)
From-SVN: r11669

gcc/config/sh/sh.h

index c2e81b44cc254d451726bb3986b0c9ffa9db9c19..6309a38ca4122b3e6fbe326d83bd581447e7e456 100644 (file)
@@ -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