From: Marek Michalkiewicz Date: Wed, 28 Mar 2001 17:11:28 +0000 (+0200) Subject: libgcc.S (__mulhi3): Correct tests to exit the loop when multiplier or multiplicand... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=500164d2363d678e4c44a45c8962ca4081e5b218;p=gcc.git libgcc.S (__mulhi3): Correct tests to exit the loop when multiplier or multiplicand is zero. * config/avr/libgcc.S (__mulhi3): Correct tests to exit the loop when multiplier or multiplicand is zero. From-SVN: r40933 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8c76b2e0c85..2b2ae64d548 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-03-28 Marek Michalkiewicz + + * config/avr/libgcc.S (__mulhi3): Correct tests to exit the loop + when multiplier or multiplicand is zero. + 2001-03-28 Bernd Schmidt * cselib.c (hash_rtx): Don't do tail recursion elimination by hand. diff --git a/gcc/config/avr/libgcc.S b/gcc/config/avr/libgcc.S index cdf2c3f4ee1..b438954b757 100644 --- a/gcc/config/avr/libgcc.S +++ b/gcc/config/avr/libgcc.S @@ -137,11 +137,13 @@ __mulhi3_skip1: add r_arg2L,r_arg2L ; shift multiplicand adc r_arg2H,r_arg2H - cpc r_arg2L,__zero_reg__ + cp r_arg2L,__zero_reg__ + cpc r_arg2H,__zero_reg__ breq __mulhi3_exit ; while multiplicand != 0 lsr r_arg1H ; gets LSB of multiplier ror r_arg1L + cp r_arg1L,__zero_reg__ cpc r_arg1H,__zero_reg__ brne __mulhi3_loop ; exit if multiplier = 0 __mulhi3_exit: