/[avr-libc]/avr-libc/libm/fplib/floor.S
ViewVC logotype

Diff of /avr-libc/libm/fplib/floor.S

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by joerg_wunsch, Thu Jun 30 22:31:07 2005 UTC revision 1.4.2.1 by aesok, Mon Dec 5 22:06:55 2005 UTC
# Line 57  Line 57 
57            FUNCTION(floor)            FUNCTION(floor)
58    
59  GLOBAL(floor)  GLOBAL(floor)
60      BST     rA3,7      RCALL   _U(__fp_split_a)    ; split up in sign : exp : fraction   : fraction extention
61      RCALL   _U(__fp_split1)  ; split up in sign : exp : fraction   : fraction extention                                  ;          x  T    : rA3 : rA2:rA1:rA0: rAE
                                               ;          x  T      R19   R18:rSI0:R16: R1  
62      CPI     rA3,0x7F         ; Exp >= 0x7F -> arg >= 1.0      CPI     rA3,0x7F         ; Exp >= 0x7F -> arg >= 1.0
63      BRCC    3f      BRCC    3f
64      BRTS    1f               ; |arg| < 1.0 -> floor = / 0.0  fr X >= 0.0      BRTS    1f               ; |arg| < 1.0 -> floor = / 0.0  fr X >= 0.0
# Line 74  GLOBAL(floor) Line 73  GLOBAL(floor)
73      LSR     rA2              ;      LSR     rA2              ;
74      ROR     rA1              ; shift out fractional bits to the right      ROR     rA1              ; shift out fractional bits to the right
75      ROR     rA0              ; until mantissa is a normalized unsigned      ROR     rA0              ; until mantissa is a normalized unsigned
76      adc     rAE,rT1c         ; rAE cleard by fp_split1, rT1c = __zero_reg__      adc     rAE, __zero_reg__   ; rAE cleard by fp_split1
77      INC     rA3      INC     rA3
78  3:                           ; |arg| >= 1.0  3:                           ; |arg| >= 1.0
79      CPI     rA3,0x96         ;      CPI     rA3,0x96         ;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.4.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26