--- /usr/src/avr-libc-1.2.0/libm/fplib/divsf3x.S 2004-11-10 17:04:46.000000000 -0400 +++ divsf3x.S 2005-01-08 17:46:29.184876459 -0400 @@ -6,7 +6,6 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. @@ -53,9 +52,19 @@ FUNCTION(__divsf3x) GLOBAL(__divsf3x) - TST rB3 + + ;Check if fractional part of B is zero, do this by + ;ORing zero with the three fraction part registers. If the result + ;is still zero all the registers should have been zero + CLR __tmp_reg__ + OR __tmp_reg__, rB2 + OR __tmp_reg__, rB1 + OR __tmp_reg__, rB0 BREQ ___divsf3x_INF ; even 0/0 - TST rA3 + CLR __tmp_reg__ + OR __tmp_reg__, rA2 + OR __tmp_reg__, rA1 + OR __tmp_reg__, rA0 BREQ ___divsf3x_ZERO ; 0/x = 0 ;calculate new exponent & check for overflow underflow