From: Michael Beck Date: Sat, 17 Sep 2005 14:21:09 +0000 (+0000) Subject: tarval_not() han now handle tarval_b_true and tarval_b_false X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=62fb9d23c60ceb2e68e16a9c08eab31827025194;p=libfirm tarval_not() han now handle tarval_b_true and tarval_b_false [r6638] --- diff --git a/ir/tv/tv.c b/ir/tv/tv.c index 4bf867f07..e724cdc89 100644 --- a/ir/tv/tv.c +++ b/ir/tv/tv.c @@ -988,7 +988,6 @@ tarval *tarval_not(tarval *a) ANNOUNCE(); assert(a); - assert(mode_is_int(a->mode)); /* bitwise negation is only allowed for integer */ /* works for vector mode without changes */ @@ -999,7 +998,15 @@ tarval *tarval_not(tarval *a) sc_not(a->value, buffer); return get_tarval(buffer, a->length, a->mode); + case irms_internal_boolean: + if (a == tarval_b_true) + return tarval_b_false; + if (a == tarval_b_false) + return tarval_b_true; + return tarval_bad; + default: + assert(0 && "bitwise negation is only allowed for integer and boolean"); return tarval_bad; } }