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

TOMOYO Linux Cross Reference
Linux/arch/sparc/lib/strncmp_32.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/sparc/lib/strncmp_32.S (Architecture sparc) and /arch/m68k/lib/strncmp_32.S (Architecture m68k)


  1 /* SPDX-License-Identifier: GPL-2.0 */            
  2 /*                                                
  3  * strncmp.S: Hand optimized Sparc assembly of    
  4  *            generic strncmp routine.            
  5  */                                               
  6                                                   
  7 #include <linux/export.h>                         
  8 #include <linux/linkage.h>                        
  9                                                   
 10         .text                                     
 11 ENTRY(strncmp)                                    
 12         mov     %o0, %g3                          
 13         mov     0, %o3                            
 14                                                   
 15         cmp     %o2, 3                            
 16         ble     7f                                
 17          mov    0, %g2                            
 18                                                   
 19         sra     %o2, 2, %o4                       
 20         ldub    [%g3], %o3                        
 21                                                   
 22 0:                                                
 23         ldub    [%o1], %g2                        
 24         add     %g3, 1, %g3                       
 25         and     %o3, 0xff, %o0                    
 26                                                   
 27         cmp     %o0, 0                            
 28         be      8f                                
 29          add    %o1, 1, %o1                       
 30                                                   
 31         cmp     %o0, %g2                          
 32         be,a    1f                                
 33          ldub   [%g3], %o3                        
 34                                                   
 35         retl                                      
 36          sub    %o0, %g2, %o0                     
 37                                                   
 38 1:                                                
 39         ldub    [%o1], %g2                        
 40         add     %g3,1, %g3                        
 41         and     %o3, 0xff, %o0                    
 42                                                   
 43         cmp     %o0, 0                            
 44         be      8f                                
 45          add    %o1, 1, %o1                       
 46                                                   
 47         cmp     %o0, %g2                          
 48         be,a    1f                                
 49          ldub   [%g3], %o3                        
 50                                                   
 51         retl                                      
 52          sub    %o0, %g2, %o0                     
 53                                                   
 54 1:                                                
 55         ldub    [%o1], %g2                        
 56         add     %g3, 1, %g3                       
 57         and     %o3, 0xff, %o0                    
 58                                                   
 59         cmp     %o0, 0                            
 60         be      8f                                
 61          add    %o1, 1, %o1                       
 62                                                   
 63         cmp     %o0, %g2                          
 64         be,a    1f                                
 65          ldub   [%g3], %o3                        
 66                                                   
 67         retl                                      
 68          sub    %o0, %g2, %o0                     
 69                                                   
 70 1:                                                
 71         ldub    [%o1], %g2                        
 72         add     %g3, 1, %g3                       
 73         and     %o3, 0xff, %o0                    
 74                                                   
 75         cmp     %o0, 0                            
 76         be      8f                                
 77          add    %o1, 1, %o1                       
 78                                                   
 79         cmp     %o0, %g2                          
 80         be      1f                                
 81          add    %o4, -1, %o4                      
 82                                                   
 83         retl                                      
 84          sub    %o0, %g2, %o0                     
 85                                                   
 86 1:                                                
 87                                                   
 88         cmp     %o4, 0                            
 89         bg,a    0b                                
 90          ldub   [%g3], %o3                        
 91                                                   
 92         b       7f                                
 93          and    %o2, 3, %o2                       
 94                                                   
 95 9:                                                
 96         ldub    [%o1], %g2                        
 97         add     %g3, 1, %g3                       
 98         and     %o3, 0xff, %o0                    
 99                                                   
100         cmp     %o0, 0                            
101         be      8f                                
102          add    %o1, 1, %o1                       
103                                                   
104         cmp     %o0, %g2                          
105         be      7f                                
106          add    %o2, -1, %o2                      
107                                                   
108 8:                                                
109         retl                                      
110          sub    %o0, %g2, %o0                     
111                                                   
112 7:                                                
113         cmp     %o2, 0                            
114         bg,a    9b                                
115          ldub   [%g3], %o3                        
116                                                   
117         and     %g2, 0xff, %o0                    
118         retl                                      
119          sub    %o3, %o0, %o0                     
120 ENDPROC(strncmp)                                  
121 EXPORT_SYMBOL(strncmp)                            
                                                      

~ [ 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