aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr/libgcc.S
diff options
context:
space:
mode:
authorMarek Michalkiewicz <marekm@linux.org.pl>2001-03-28 19:11:28 +0200
committerMarek Michalkiewicz <marekm@gcc.gnu.org>2001-03-28 17:11:28 +0000
commit500164d2363d678e4c44a45c8962ca4081e5b218 (patch)
tree64ed899563be775df3576f803362bdb675044b05 /gcc/config/avr/libgcc.S
parent112333d3e40032c6d3fbf393a247c2b7f8ab9d98 (diff)
downloadgcc-500164d2363d678e4c44a45c8962ca4081e5b218.zip
gcc-500164d2363d678e4c44a45c8962ca4081e5b218.tar.gz
gcc-500164d2363d678e4c44a45c8962ca4081e5b218.tar.bz2
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
Diffstat (limited to 'gcc/config/avr/libgcc.S')
-rw-r--r--gcc/config/avr/libgcc.S4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/config/avr/libgcc.S b/gcc/config/avr/libgcc.S
index cdf2c3f..b438954 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: