diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-02 12:17:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:02:32 -0700 |
commit | e40ca10a3cfd63bd1a67f223fb9c09fc0799ecea (patch) | |
tree | abd7f27f6b7fbc3face277741ea8563897024caf /compile-i386.c | |
parent | Teach compile-i386.c to emit select instructions. (diff) | |
download | sparse-e40ca10a3cfd63bd1a67f223fb9c09fc0799ecea.tar.gz sparse-e40ca10a3cfd63bd1a67f223fb9c09fc0799ecea.tar.bz2 sparse-e40ca10a3cfd63bd1a67f223fb9c09fc0799ecea.zip |
Make compile-i386.c create pseudo-code for the logical binops.
It gets them wrong right now: we can't just use "and" and "or",
we need to convert to canonical logical form (0/1) too.
But it's documentation.
Diffstat (limited to 'compile-i386.c')
-rw-r--r-- | compile-i386.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compile-i386.c b/compile-i386.c index 2e97702..a3174c6 100644 --- a/compile-i386.c +++ b/compile-i386.c @@ -1178,6 +1178,14 @@ static struct storage *emit_binop(struct expression *expr) else opname = "div"; break; + case SPECIAL_LOGICAL_AND: + warn(expr->pos, "bogus bitwise and for logical op (should use '2*setne + and' or something)"); + opname = "and"; + break; + case SPECIAL_LOGICAL_OR: + warn(expr->pos, "bogus bitwise or for logical op (should use 'or + setne' or something)"); + opname = "or"; + break; default: error(expr->pos, "unhandled binop '%s'\n", show_special(expr->op)); break; |