From aa702fa8553a3eea83b09d2dfa42a664ffa2ca20 Mon Sep 17 00:00:00 2001 From: ceriel Date: Sat, 23 Nov 1991 12:17:18 +0000 Subject: [PATCH] Bug fix in multiplication optimization --- util/opt/peephole.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/util/opt/peephole.c b/util/opt/peephole.c index 3df804144..329a1a926 100644 --- a/util/opt/peephole.c +++ b/util/opt/peephole.c @@ -777,19 +777,19 @@ repl_mul(lp, b, e) newinstr(b, op_exg, sz); b = &((*b)->l_next); newinstr(b, op_dup, 2*sz); b = &((*b)->l_next); newinstr(b, op_asp, sz); b = &((*b)->l_next); - newinstr(b, op_sbu, sz); b = &((*b)->l_next); - retval++; - newinstr(b, op_exg, sz); b = &((*b)->l_next); - newinstr(b, op_loc, n1); b = &((*b)->l_next); - newinstr(b, op_slu, sz); b = &((*b)->l_next); - retval++; - newinstr(b, op_exg, sz); b = &((*b)->l_next); - newinstr(b, op_dup, 2*sz); b = &((*b)->l_next); - newinstr(b, op_asp, sz); b = &((*b)->l_next); - newinstr(b, op_adu, sz); b = &((*b)->l_next); - newinstr(b, op_exg, sz); b = &((*b)->l_next); - retval++; } + newinstr(b, op_sbu, sz); b = &((*b)->l_next); + retval++; + newinstr(b, op_exg, sz); b = &((*b)->l_next); + newinstr(b, op_loc, n1); b = &((*b)->l_next); + newinstr(b, op_slu, sz); b = &((*b)->l_next); + retval++; + newinstr(b, op_exg, sz); b = &((*b)->l_next); + newinstr(b, op_dup, 2*sz); b = &((*b)->l_next); + newinstr(b, op_asp, sz); b = &((*b)->l_next); + newinstr(b, op_adu, sz); b = &((*b)->l_next); + newinstr(b, op_exg, sz); b = &((*b)->l_next); + retval++; if (n0) { newinstr(b, op_loc, n0); b = &((*b)->l_next); newinstr(b, op_slu, sz); b = &((*b)->l_next); -- 2.34.1