aboutsummaryrefslogtreecommitdiff
path: root/cc.h
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2021-09-28 12:13:33 -0700
committerMichael Forney <mforney@mforney.org>2021-09-28 12:17:29 -0700
commit7e8386697aa60c1813019eda3cd2073e6be5b021 (patch)
tree14659072efa826982a43253af8cc3eb9b4c85381 /cc.h
parentab3946c6801be3520beeb79f5500ed1a944d4667 (diff)
Skip unnecessary conversion to bool for logical and conditional expressions
As in ede6a5c9, if an expression is used only to control a jnz, we don't need to convert it to a 0 or 1 value. QBE ignores the upper 32-bits of the argument to jnz, so the conversion is still needed for pointer, long, and floating point types (including float since -0 has non-zero bit representation).
Diffstat (limited to 'cc.h')
-rw-r--r--cc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cc.h b/cc.h
index 41f7d90..49a3fd0 100644
--- a/cc.h
+++ b/cc.h
@@ -527,7 +527,7 @@ struct type *functype(struct func *);
void funclabel(struct func *, struct block *);
struct value *funcexpr(struct func *, struct expr *);
void funcjmp(struct func *, struct block *);
-void funcjnz(struct func *, struct value *, struct block *, struct block *);
+void funcjnz(struct func *, struct value *, struct type *, struct block *, struct block *);
void funcret(struct func *, struct value *);
struct gotolabel *funcgoto(struct func *, char *);
void funcswitch(struct func *, struct value *, struct switchcases *, struct block *);