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

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


  1 /* SPDX-License-Identifier: GPL-2.0 */            
  2 /*                                                
  3  * arch/alpha/lib/copy_user.S                     
  4  *                                                
  5  * Copy to/from user space, handling exception    
  6  * isn't exactly pretty.                          
  7  *                                                
  8  * This is essentially the same as "memcpy()",    
  9  * Notably, we have to make sure that $0 is al    
 10  * contains the right "bytes left to copy" val    
 11  * only _after_ a successful copy). There is a    
 12  * exception setup stuff..                        
 13  */                                               
 14                                                   
 15 #include <linux/export.h>                         
 16                                                   
 17 /* Allow an exception for an insn; exit if we     
 18 #define EXI(x,y...)                     \         
 19         99: x,##y;                      \         
 20         .section __ex_table,"a";        \         
 21         .long 99b - .;                  \         
 22         lda $31, $exitin-99b($31);      \         
 23         .previous                                 
 24                                                   
 25 #define EXO(x,y...)                     \         
 26         99: x,##y;                      \         
 27         .section __ex_table,"a";        \         
 28         .long 99b - .;                  \         
 29         lda $31, $exitout-99b($31);     \         
 30         .previous                                 
 31                                                   
 32         .set noat                                 
 33         .align 4                                  
 34         .globl __copy_user                        
 35         .ent __copy_user                          
 36 __copy_user:                                      
 37         .prologue 0                               
 38         mov $18,$0                                
 39         and $16,7,$3                              
 40         beq $0,$35                                
 41         beq $3,$36                                
 42         subq $3,8,$3                              
 43         .align 4                                  
 44 $37:                                              
 45         EXI( ldq_u $1,0($17) )                    
 46         EXO( ldq_u $2,0($16) )                    
 47         extbl $1,$17,$1                           
 48         mskbl $2,$16,$2                           
 49         insbl $1,$16,$1                           
 50         addq $3,1,$3                              
 51         bis $1,$2,$1                              
 52         EXO( stq_u $1,0($16) )                    
 53         subq $0,1,$0                              
 54         addq $16,1,$16                            
 55         addq $17,1,$17                            
 56         beq $0,$41                                
 57         bne $3,$37                                
 58 $36:                                              
 59         and $17,7,$1                              
 60         bic $0,7,$4                               
 61         beq $1,$43                                
 62         beq $4,$48                                
 63         EXI( ldq_u $3,0($17) )                    
 64         .align 4                                  
 65 $50:                                              
 66         EXI( ldq_u $2,8($17) )                    
 67         subq $4,8,$4                              
 68         extql $3,$17,$3                           
 69         extqh $2,$17,$1                           
 70         bis $3,$1,$1                              
 71         EXO( stq $1,0($16) )                      
 72         addq $17,8,$17                            
 73         subq $0,8,$0                              
 74         addq $16,8,$16                            
 75         bis $2,$2,$3                              
 76         bne $4,$50                                
 77 $48:                                              
 78         beq $0,$41                                
 79         .align 4                                  
 80 $57:                                              
 81         EXI( ldq_u $1,0($17) )                    
 82         EXO( ldq_u $2,0($16) )                    
 83         extbl $1,$17,$1                           
 84         mskbl $2,$16,$2                           
 85         insbl $1,$16,$1                           
 86         bis $1,$2,$1                              
 87         EXO( stq_u $1,0($16) )                    
 88         subq $0,1,$0                              
 89         addq $16,1,$16                            
 90         addq $17,1,$17                            
 91         bne $0,$57                                
 92         br $31,$41                                
 93         .align 4                                  
 94 $43:                                              
 95         beq $4,$65                                
 96         .align 4                                  
 97 $66:                                              
 98         EXI( ldq $1,0($17) )                      
 99         subq $4,8,$4                              
100         EXO( stq $1,0($16) )                      
101         addq $17,8,$17                            
102         subq $0,8,$0                              
103         addq $16,8,$16                            
104         bne $4,$66                                
105 $65:                                              
106         beq $0,$41                                
107         EXI( ldq $2,0($17) )                      
108         EXO( ldq $1,0($16) )                      
109         mskql $2,$0,$2                            
110         mskqh $1,$0,$1                            
111         bis $2,$1,$2                              
112         EXO( stq $2,0($16) )                      
113         bis $31,$31,$0                            
114 $41:                                              
115 $35:                                              
116 $exitin:                                          
117 $exitout:                                         
118         ret $31,($26),1                           
119                                                   
120         .end __copy_user                          
121 EXPORT_SYMBOL(__copy_user)                        
                                                      

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