~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/m68k/fpsp040/ssinh.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/m68k/fpsp040/ssinh.S (Version linux-6.12-rc7) and /arch/i386/fpsp040/ssinh.S (Version linux-6.9.12)


  1 |                                                 
  2 |       ssinh.sa 3.1 12/10/90                     
  3 |                                                 
  4 |       The entry point sSinh computes the hyp    
  5 |       an input argument; sSinhd does the sam    
  6 |       input.                                    
  7 |                                                 
  8 |       Input: Double-extended number X in loc    
  9 |               by address register a0.           
 10 |                                                 
 11 |       Output: The value sinh(X) returned in     
 12 |                                                 
 13 |       Accuracy and Monotonicity: The returne    
 14 |               64 significant bit, i.e. withi    
 15 |               result is subsequently rounded    
 16 |               result is provably monotonic i    
 17 |                                                 
 18 |       Speed: The program sSINH takes approxi    
 19 |                                                 
 20 |       Algorithm:                                
 21 |                                                 
 22 |       SINH                                      
 23 |       1. If |X| > 16380 log2, go to 3.          
 24 |                                                 
 25 |       2. (|X| <= 16380 log2) Sinh(X) is obta    
 26 |               y = |X|, sgn = sign(X), and z     
 27 |               sinh(X) = sgn*(1/2)*( z + z/(1    
 28 |          Exit.                                  
 29 |                                                 
 30 |       3. If |X| > 16480 log2, go to 5.          
 31 |                                                 
 32 |       4. (16380 log2 < |X| <= 16480 log2)       
 33 |               sinh(X) = sign(X) * exp(|X|)/2    
 34 |          However, invoking exp(|X|) may caus    
 35 |          Thus, we calculate sinh(X) as follo    
 36 |             Y       := |X|                      
 37 |             sgn     := sign(X)                  
 38 |             sgnFact := sgn * 2**(16380)         
 39 |             Y'      := Y - 16381 log2           
 40 |             sinh(X) := sgnFact * exp(Y').       
 41 |          Exit.                                  
 42 |                                                 
 43 |       5. (|X| > 16480 log2) sinh(X) must ove    
 44 |          sign(X)*Huge*Huge to generate overf    
 45 |          the appropriate sign. Huge is the l    
 46 |          extended format. Exit.                 
 47 |                                                 
 48                                                   
 49 |               Copyright (C) Motorola, Inc. 1    
 50 |                       All Rights Reserved       
 51 |                                                 
 52 |       For details on the license for this fi    
 53 |       file, README, in this same directory.     
 54                                                   
 55 |SSINH  idnt    2,1 | Motorola 040 Floating Po    
 56                                                   
 57         |section        8                         
 58                                                   
 59 T1:     .long 0x40C62D38,0xD3D64634 | ... 1638    
 60 T2:     .long 0x3D6F90AE,0xB1E75CC7 | ... 1638    
 61                                                   
 62         |xref   t_frcinx                          
 63         |xref   t_ovfl                            
 64         |xref   t_extdnrm                         
 65         |xref   setox                             
 66         |xref   setoxm1                           
 67                                                   
 68         .global ssinhd                            
 69 ssinhd:                                           
 70 |--SINH(X) = X FOR DENORMALIZED X                 
 71                                                   
 72         bra     t_extdnrm                         
 73                                                   
 74         .global ssinh                             
 75 ssinh:                                            
 76         fmovex  (%a0),%fp0      | ...LOAD INPU    
 77                                                   
 78         movel   (%a0),%d0                         
 79         movew   4(%a0),%d0                        
 80         movel   %d0,%a1         | save a copy     
 81         andl    #0x7FFFFFFF,%d0                   
 82         cmpl    #0x400CB167,%d0                   
 83         bgts    SINHBIG                           
 84                                                   
 85 |--THIS IS THE USUAL CASE, |X| < 16380 LOG2       
 86 |--Y = |X|, Z = EXPM1(Y), SINH(X) = SIGN(X)*(1    
 87                                                   
 88         fabsx   %fp0            | ...Y = |X|      
 89                                                   
 90         moveml  %a1/%d1,-(%sp)                    
 91         fmovemx %fp0-%fp0,(%a0)                   
 92         clrl    %d1                               
 93         bsr     setoxm1         | ...FP0 IS Z     
 94         fmovel  #0,%fpcr                          
 95         moveml  (%sp)+,%a1/%d1                    
 96                                                   
 97         fmovex  %fp0,%fp1                         
 98         fadds   #0x3F800000,%fp1        | ...1    
 99         fmovex  %fp0,-(%sp)                       
100         fdivx   %fp1,%fp0               | ...Z    
101         movel   %a1,%d0                           
102         andl    #0x80000000,%d0                   
103         orl     #0x3F000000,%d0                   
104         faddx   (%sp)+,%fp0                       
105         movel   %d0,-(%sp)                        
106                                                   
107         fmovel  %d1,%fpcr                         
108         fmuls   (%sp)+,%fp0     |last fp inst     
109                                                   
110         bra     t_frcinx                          
111                                                   
112 SINHBIG:                                          
113         cmpl    #0x400CB2B3,%d0                   
114         bgt     t_ovfl                            
115         fabsx   %fp0                              
116         fsubd   T1(%pc),%fp0    | ...(|X|-1638    
117         movel   #0,-(%sp)                         
118         movel   #0x80000000,-(%sp)                
119         movel   %a1,%d0                           
120         andl    #0x80000000,%d0                   
121         orl     #0x7FFB0000,%d0                   
122         movel   %d0,-(%sp)      | ...EXTENDED     
123         fsubd   T2(%pc),%fp0    | ...|X| - 163    
124                                                   
125         movel   %d1,-(%sp)                        
126         clrl    %d1                               
127         fmovemx %fp0-%fp0,(%a0)                   
128         bsr     setox                             
129         fmovel  (%sp)+,%fpcr                      
130                                                   
131         fmulx   (%sp)+,%fp0     |possible exce    
132         bra     t_frcinx                          
133                                                   
134         |end                                      
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php