mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
produce better code for v6 %
This commit is contained in:
parent
308ff7163f
commit
eb4aa7ccec
1 changed files with 8 additions and 4 deletions
|
@ -1445,13 +1445,17 @@ binary_expr (int op, expr_t *e1, expr_t *e2)
|
||||||
{
|
{
|
||||||
expr_t *tmp1, *tmp2;
|
expr_t *tmp1, *tmp2;
|
||||||
e = new_block_expr ();
|
e = new_block_expr ();
|
||||||
|
if (e2->type < ex_string)
|
||||||
tmp1 = new_temp_def_expr (&type_float);
|
tmp1 = new_temp_def_expr (&type_float);
|
||||||
|
else
|
||||||
|
tmp1 = e2;
|
||||||
tmp2 = new_temp_def_expr (&type_float);
|
tmp2 = new_temp_def_expr (&type_float);
|
||||||
e2 = binary_expr ('&', e2, new_float_expr (-1.0));
|
e2 = binary_expr ('&', e2, new_float_expr (-1.0));
|
||||||
e1 = binary_expr ('&', e1, new_float_expr (-1.0));
|
e1 = binary_expr ('&', e1, new_float_expr (-1.0));
|
||||||
append_expr (e, assign_expr (tmp1, e2));
|
if (tmp1 != e2)
|
||||||
append_expr (e, assign_expr (tmp2,
|
append_expr (e, new_bind_expr (e2, tmp1));
|
||||||
binary_expr ('/', e1, tmp1)));
|
append_expr (e, new_bind_expr (binary_expr ('/', e1, tmp1),
|
||||||
|
tmp2));
|
||||||
e2 = binary_expr ('&', tmp2, new_float_expr (-1.0));
|
e2 = binary_expr ('&', tmp2, new_float_expr (-1.0));
|
||||||
e->e.block.result = binary_expr ('-', tmp2, e2);
|
e->e.block.result = binary_expr ('-', tmp2, e2);
|
||||||
e2 = e;
|
e2 = e;
|
||||||
|
|
Loading…
Reference in a new issue