From 35bb77fd397ff2d2fefd3cfc394270e3d99ed9de Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 26 May 1994 18:49:06 -0400 Subject: [PATCH] (CANONICALIZE_COMPARISON): New macro. From-SVN: r7354 --- gcc/config/alpha/alpha.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index ba135336986..5b7e72eb643 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. */ -- 2.30.2