2012-09-26 21:11:01 -07:00
/ * NG4 p a t c h . S : P a t c h U l t r a - I r o u t i n e s w i t h N i a g a r a - 4 v a r i a n t .
*
* Copyright ( C ) 2 0 1 2 D a v i d S . M i l l e r < d a v e m @davemloft.net>
* /
# define B R A N C H _ A L W A Y S 0 x10 6 8 0 0 0 0
# define N O P 0 x01 0 0 0 0 0 0
# define N G _ D O _ P A T C H ( O L D , N E W ) \
sethi % h i ( N E W ) , % g 1 ; \
or % g 1 , % l o ( N E W ) , % g 1 ; \
sethi % h i ( O L D ) , % g 2 ; \
or % g 2 , % l o ( O L D ) , % g 2 ; \
sub % g 1 , % g 2 , % g 1 ; \
sethi % h i ( B R A N C H _ A L W A Y S ) , % g 3 ; \
sll % g 1 , 1 1 , % g 1 ; \
srl % g 1 , 1 1 + 2 , % g 1 ; \
or % g 3 , % l o ( B R A N C H _ A L W A Y S ) , % g 3 ; \
or % g 3 , % g 1 , % g 3 ; \
stw % g 3 , [ % g 2 ] ; \
sethi % h i ( N O P ) , % g 3 ; \
or % g 3 , % l o ( N O P ) , % g 3 ; \
stw % g 3 , [ % g 2 + 0 x4 ] ; \
flush % g 2 ;
.globl niagara4_patch_copyops
.type niagara4 _ p a t c h _ c o p y o p s ,#f u n c t i o n
niagara4_patch_copyops :
NG_ D O _ P A T C H ( m e m c p y , N G 4 m e m c p y )
2017-03-21 17:04:45 -04:00
NG_ D O _ P A T C H ( r a w _ c o p y _ f r o m _ u s e r , N G 4 c o p y _ f r o m _ u s e r )
NG_ D O _ P A T C H ( r a w _ c o p y _ t o _ u s e r , N G 4 c o p y _ t o _ u s e r )
2012-09-26 21:11:01 -07:00
retl
nop
.size niagara4 _ p a t c h _ c o p y o p s ,. - n i a g a r a4 _ p a t c h _ c o p y o p s
2012-10-05 13:45:26 -07:00
.globl niagara4_patch_bzero
.type niagara4 _ p a t c h _ b z e r o ,#f u n c t i o n
niagara4_patch_bzero :
NG_ D O _ P A T C H ( m e m s e t , N G 4 m e m s e t )
NG_ D O _ P A T C H ( _ _ b z e r o , N G 4 b z e r o )
NG_ D O _ P A T C H ( _ _ c l e a r _ u s e r , N G c l e a r _ u s e r )
NG_ D O _ P A T C H ( t s b _ i n i t , N G t s b _ i n i t )
retl
nop
.size niagara4 _ p a t c h _ b z e r o ,. - n i a g a r a4 _ p a t c h _ b z e r o
2012-09-26 21:11:01 -07:00
.globl niagara4_patch_pageops
.type niagara4 _ p a t c h _ p a g e o p s ,#f u n c t i o n
niagara4_patch_pageops :
NG_ D O _ P A T C H ( c o p y _ u s e r _ p a g e , N G 4 c o p y _ u s e r _ p a g e )
2012-10-05 13:45:26 -07:00
NG_ D O _ P A T C H ( _ c l e a r _ p a g e , N G 4 c l e a r _ p a g e )
NG_ D O _ P A T C H ( c l e a r _ u s e r _ p a g e , N G 4 c l e a r _ u s e r _ p a g e )
2012-09-26 21:11:01 -07:00
retl
nop
.size niagara4 _ p a t c h _ p a g e o p s ,. - n i a g a r a4 _ p a t c h _ p a g e o p s