Age | Commit message (Collapse) | Author |
|
This compiles `0 ? e1 : e2` as `e2`, and `1 ? e1 : e2` as `e1`
(while still adjusting the type as necessary).
|
|
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).
|
|
We always store the result to a w temporary, so there is no difference.
In fact, QBE provides loadw as an alias for loadsw precisely for
this reason.
|
|
|
|
When we are evaluating an arithmetic constant expression, we don't want
to indroduce static data definitions for string or compound literals.
Fixes #59.
|