aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-05-26 18:49:06 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-05-26 18:49:06 -0400
commit35bb77fd397ff2d2fefd3cfc394270e3d99ed9de (patch)
treea09d113ada5bb436dc3b14452005cc4dc5d124f5 /gcc
parentb7a775b20bca07cac697f0b99fb85864ee515cef (diff)
downloadgcc-35bb77fd397ff2d2fefd3cfc394270e3d99ed9de.zip
gcc-35bb77fd397ff2d2fefd3cfc394270e3d99ed9de.tar.gz
gcc-35bb77fd397ff2d2fefd3cfc394270e3d99ed9de.tar.bz2
(CANONICALIZE_COMPARISON): New macro.
From-SVN: r7354
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/alpha/alpha.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index ba13533..5b7e72e 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -1278,6 +1278,26 @@ extern char *current_function_name;
#define FLOAT_STORE_FLAG_VALUE 0.5
+/* Canonicalize a comparison from one we don't have to one we do have. */
+
+#define CANONICALIZE_COMPARISON(CODE,OP0,OP1) \
+ do { \
+ if (((CODE) == GE || (CODE) == GT || (CODE) == GEU || (CODE) == GTU) \
+ && (GET_CODE (OP1) == REG || (OP1) == const0_rtx)) \
+ { \
+ rtx tem = (OP0); \
+ (OP0) = (OP1); \
+ (OP1) = tem; \
+ (CODE) = swap_condition (CODE); \
+ } \
+ if (((CODE) == LT || (CODE) == LTU) \
+ && GET_CODE (OP1) == CONST_INT && INTVAL (OP1) == 256) \
+ { \
+ (CODE) = (CODE) == LT ? LE : LEU; \
+ (OP1) = GEN_INT (255); \
+ } \
+ } while (0)
+
/* Specify the machine mode that pointers have.
After generation of rtl, the compiler makes no further distinction
between pointers and any other objects of this machine mode. */