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

TOMOYO Linux Cross Reference
Linux/arch/alpha/lib/copy_user.S

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/alpha/lib/copy_user.S (Architecture ppc) and /arch/alpha/lib/copy_user.S (Architecture alpha)


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