From: Richard Kenner Date: Thu, 26 May 1994 22:49:06 +0000 (-0400) Subject: (CANONICALIZE_COMPARISON): New macro. X-Git-Tag: misc/cutover-egcs-0~6589 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35bb77fd397ff2d2fefd3cfc394270e3d99ed9de;p=thirdparty%2Fgcc.git (CANONICALIZE_COMPARISON): New macro. From-SVN: r7354 --- diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index ba135336986c..5b7e72eb6437 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. */