arch/alpha/lib/copy_user.S

Source file repositories/reference/linux-study-clean/arch/alpha/lib/copy_user.S

File Facts

System
Linux kernel
Corpus path
arch/alpha/lib/copy_user.S
Extension
.S
Size
2118 bytes
Lines
122
Domain
Architecture Layer
Bucket
arch/alpha
Inferred role
Architecture Layer: exported/initcall integration point
Status
integration implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#include <linux/export.h>

/* Allow an exception for an insn; exit if we get one.  */
#define EXI(x,y...)			\
	99: x,##y;			\
	.section __ex_table,"a";	\
	.long 99b - .;			\
	lda $31, $exitin-99b($31);	\
	.previous

#define EXO(x,y...)			\
	99: x,##y;			\
	.section __ex_table,"a";	\
	.long 99b - .;			\
	lda $31, $exitout-99b($31);	\
	.previous

	.set noat
	.align 4
	.globl __copy_user
	.ent __copy_user
__copy_user:
	.prologue 0
	mov $18,$0
	and $16,7,$3
	beq $0,$35
	beq $3,$36
	subq $3,8,$3
	.align 4
$37:
	EXI( ldq_u $1,0($17) )
	EXO( ldq_u $2,0($16) )
	extbl $1,$17,$1
	mskbl $2,$16,$2
	insbl $1,$16,$1
	addq $3,1,$3
	bis $1,$2,$1
	EXO( stq_u $1,0($16) )
	subq $0,1,$0
	addq $16,1,$16
	addq $17,1,$17
	beq $0,$41
	bne $3,$37
$36:
	and $17,7,$1
	bic $0,7,$4
	beq $1,$43
	beq $4,$48
	EXI( ldq_u $3,0($17) )
	.align 4
$50:
	EXI( ldq_u $2,8($17) )
	subq $4,8,$4
	extql $3,$17,$3
	extqh $2,$17,$1
	bis $3,$1,$1
	EXO( stq $1,0($16) )
	addq $17,8,$17
	subq $0,8,$0
	addq $16,8,$16
	bis $2,$2,$3
	bne $4,$50
$48:
	beq $0,$41
	.align 4
$57:
	EXI( ldq_u $1,0($17) )
	EXO( ldq_u $2,0($16) )
	extbl $1,$17,$1
	mskbl $2,$16,$2

Annotation

Implementation Notes