mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Produce slightly better v6 modulo code for complex inputs.
I'm having problems with temp defs, but I imagine this code is rarely used so I won't worry about it for now. It will, however, make a good test case for when I rework emit.c after I do some reading.
This commit is contained in:
parent
b90833d86f
commit
52e844ee48
1 changed files with 7 additions and 2 deletions
|
@ -1704,16 +1704,21 @@ binary_expr (int op, expr_t *e1, expr_t *e2)
|
|||
tmp1 = new_temp_def_expr (&type_float);
|
||||
tmp2 = new_temp_def_expr (&type_float);
|
||||
tmp3 = new_temp_def_expr (&type_float);
|
||||
|
||||
append_expr (e, new_bind_expr (e1, t1));
|
||||
append_expr (e, new_bind_expr (e2, t2));
|
||||
e1 = binary_expr ('&', t1, t1);
|
||||
e2 = binary_expr ('&', t2, t2);
|
||||
append_expr (e, new_bind_expr (e1, tmp1));
|
||||
|
||||
append_expr (e, new_bind_expr (e2, t2));
|
||||
e2 = binary_expr ('&', t2, t2);
|
||||
append_expr (e, new_bind_expr (e2, tmp2));
|
||||
|
||||
e1 = binary_expr ('/', tmp1, tmp2);
|
||||
append_expr (e, assign_expr (tmp3, e1));
|
||||
|
||||
e2 = binary_expr ('&', tmp3, tmp3);
|
||||
append_expr (e, new_bind_expr (e2, tmp3));
|
||||
|
||||
e1 = binary_expr ('*', tmp2, tmp3);
|
||||
e2 = binary_expr ('-', tmp1, e1);
|
||||
e->e.block.result = e2;
|
||||
|
|
Loading…
Reference in a new issue