mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 18:31:27 +00:00
[qfcc] Always test float against 0 for Ruamoko
Float is not int, and Ruamoko has only int ifz/ifnz, which will fail for -0.0 (0x80000000 when viewed as an int). And then there's nan, but I haven't seen too many of those in quake.
This commit is contained in:
parent
622a2e84f4
commit
76a35c0352
1 changed files with 3 additions and 2 deletions
|
@ -109,8 +109,9 @@ test_expr (expr_t *e)
|
|||
}
|
||||
return e;
|
||||
case ev_float:
|
||||
if (options.code.fast_float
|
||||
|| options.code.progsversion == PROG_ID_VERSION) {
|
||||
if (options.code.progsversion < PROG_VERSION
|
||||
&& (options.code.fast_float
|
||||
|| options.code.progsversion == PROG_ID_VERSION)) {
|
||||
if (!is_float(type_default)) {
|
||||
if (is_constant (e)) {
|
||||
return cast_expr (type_default, e);
|
||||
|
|
Loading…
Reference in a new issue