From: James Van Artsdalen Date: Mon, 12 Oct 1992 21:37:11 +0000 (+0000) Subject: (alter_cond): If CC_NOT_SIGNED, convert signed conditions to unsigned. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b329456eff9087db32b6dd24e8300ef59821f07c;p=gcc.git (alter_cond): If CC_NOT_SIGNED, convert signed conditions to unsigned. From-SVN: r2413 --- diff --git a/gcc/final.c b/gcc/final.c index 49df7b0e318..16da27dbc89 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1940,7 +1940,33 @@ alter_cond (cond) value = 2; break; } - + + if (cc_status.flags & CC_NOT_SIGNED) + /* The flags are valid if signed condition operators are converted + to unsigned. */ + switch (GET_CODE (cond)) + { + case LE: + PUT_CODE (cond, LEU); + value = 2; + break; + + case LT: + PUT_CODE (cond, LTU); + value = 2; + break; + + case GT: + PUT_CODE (cond, GTU); + value = 2; + break; + + case GE: + PUT_CODE (cond, GEU); + value = 2; + break; + } + return value; } #endif