2005-04-17 02:20:36 +04:00
/ *
* linux/ a r c h / a r m / l i b / c o p y p a g e . S
*
* Copyright ( C ) 1 9 9 5 - 1 9 9 9 R u s s e l l K i n g
*
* This p r o g r a m i s f r e e s o f t w a r e ; you can redistribute it and/or modify
* it u n d e r t h e t e r m s o f t h e G N U G e n e r a l P u b l i c L i c e n s e v e r s i o n 2 a s
* published b y t h e F r e e S o f t w a r e F o u n d a t i o n .
*
* ASM o p t i m i s e d s t r i n g f u n c t i o n s
* /
# include < l i n u x / l i n k a g e . h >
# include < l i n u x / i n i t . h >
# include < a s m / a s s e m b l e r . h >
2005-09-09 23:08:59 +04:00
# include < a s m / a s m - o f f s e t s . h >
2005-04-17 02:20:36 +04:00
.text
.align 5
/ *
* ARMv3 o p t i m i s e d c o p y _ u s e r _ p a g e
*
* FIXME : do w e n e e d t o h a n d l e c a c h e s t u f f . . .
* /
ENTRY( v3 _ c o p y _ u s e r _ p a g e )
stmfd s p ! , { r4 , l r } @ 2
mov r2 , #P A G E _ S Z / 64 @ 1
ldmia r1 ! , { r3 , r4 , i p , l r } @ 4+1
1 : stmia r0 ! , { r3 , r4 , i p , l r } @ 4
ldmia r1 ! , { r3 , r4 , i p , l r } @ 4+1
stmia r0 ! , { r3 , r4 , i p , l r } @ 4
ldmia r1 ! , { r3 , r4 , i p , l r } @ 4+1
stmia r0 ! , { r3 , r4 , i p , l r } @ 4
ldmia r1 ! , { r3 , r4 , i p , l r } @ 4
subs r2 , r2 , #1 @ 1
stmia r0 ! , { r3 , r4 , i p , l r } @ 4
ldmneia r1 ! , { r3 , r4 , i p , l r } @ 4
bne 1 b @ 1
2006-06-25 14:23:45 +04:00
ldmfd s p ! , { r4 , p c } @ 3
2005-04-17 02:20:36 +04:00
.align 5
/ *
* ARMv3 o p t i m i s e d c l e a r _ u s e r _ p a g e
*
* FIXME : do w e n e e d t o h a n d l e c a c h e s t u f f . . .
* /
ENTRY( v3 _ c l e a r _ u s e r _ p a g e )
str l r , [ s p , #- 4 ] !
mov r1 , #P A G E _ S Z / 64 @ 1
mov r2 , #0 @ 1
mov r3 , #0 @ 1
mov i p , #0 @ 1
mov l r , #0 @ 1
1 : stmia r0 ! , { r2 , r3 , i p , l r } @ 4
stmia r0 ! , { r2 , r3 , i p , l r } @ 4
stmia r0 ! , { r2 , r3 , i p , l r } @ 4
stmia r0 ! , { r2 , r3 , i p , l r } @ 4
subs r1 , r1 , #1 @ 1
bne 1 b @ 1
ldr p c , [ s p ] , #4
_ _ INITDATA
.type v3 _ u s e r _ f n s , #o b j e c t
ENTRY( v3 _ u s e r _ f n s )
.long v3_clear_user_page
.long v3_copy_user_page
.size v3 _ u s e r _ f n s , . - v3 _ u s e r _ f n s