2005-04-17 02:20:36 +04:00
/ *
* This f i l e c o n t a i n s t h e c o d e t h a t g e t s m a p p e d a t t h e u p p e r e n d o f e a c h t a s k ' s t e x t
* region. F o r n o w , i t c o n t a i n s t h e s i g n a l t r a m p o l i n e c o d e o n l y .
*
* Copyright ( C ) 1 9 9 9 - 2 0 0 3 H e w l e t t - P a c k a r d C o
* David M o s b e r g e r - T a n g < d a v i d m @hpl.hp.com>
* /
# include < l i n u x / c o n f i g . h >
# include < a s m / a s m m a c r o . h >
# include < a s m / e r r n o . h >
2005-09-10 00:03:13 +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
# include < a s m / s i g c o n t e x t . h >
# include < a s m / s y s t e m . h >
# include < a s m / u n i s t d . h >
/ *
* We c a n ' t e a s i l y r e f e r t o s y m b o l s i n s i d e t h e k e r n e l . T o a v o i d f u l l r u n t i m e r e l o c a t i o n ,
* complications w i t h t h e l i n k e r ( w h i c h l i k e s t o c r e a t e P L T s t u b s f o r b r a n c h e s
* to t a r g e t s o u t s i d e t h e s h a r e d o b j e c t ) a n d t o a v o i d m u l t i - p h a s e k e r n e l b u i l d s , w e
* simply c r e a t e m i n i m a l i s t i c " p a t c h l i s t s " i n s p e c i a l E L F s e c t i o n s .
* /
.section " .data .patch .fsyscall_table " , " a"
.previous
# define L O A D _ F S Y S C A L L _ T A B L E ( r e g ) \
[ 1 : ] movl r e g =0 ; \
.xdata4 " .data .patch .fsyscall_table " , 1 b- .
.section " .data .patch .brl_fsys_bubble_down " , " a"
.previous
# define B R L _ C O N D _ F S Y S _ B U B B L E _ D O W N ( p r ) \
[ 1 : ] ( pr) b r l . c o n d . s p t k 0 ; \
.xdata4 " .data .patch .brl_fsys_bubble_down " , 1 b- .
GLOBAL_ E N T R Y ( _ _ k e r n e l _ s y s c a l l _ v i a _ b r e a k )
.prologue
.altrp b6
.body
/ *
* Note : for ( f a s t ) s y s c a l l r e s t a r t t o w o r k , t h e b r e a k i n s t r u c t i o n m u s t b e
* the f i r s t o n e i n t h e b u n d l e a d d r e s s e d b y s y s c a l l _ v i a _ b r e a k .
* /
{ .mib
break 0 x10 0 0 0 0
nop. i 0
br. r e t . s p t k . m a n y b6
}
END( _ _ k e r n e l _ s y s c a l l _ v i a _ b r e a k )
/ *
* On e n t r y :
* r1 1 = s a v e d a r . p f s
* r1 5 = s y s t e m c a l l #
* b0 = s a v e d r e t u r n a d d r e s s
* b6 = r e t u r n a d d r e s s
* On e x i t :
* r1 1 = s a v e d a r . p f s
* r1 5 = s y s t e m c a l l #
* b0 = s a v e d r e t u r n a d d r e s s
* all o t h e r " s c r a t c h " r e g i s t e r s : u n d e f i n e d
* all " p r e s e r v e d " r e g i s t e r s : s a m e a s o n e n t r y
* /
GLOBAL_ E N T R Y ( _ _ k e r n e l _ s y s c a l l _ v i a _ e p c )
.prologue
.altrp b6
.body
{
/ *
* Note : the k e r n e l c a n n o t a s s u m e t h a t t h e f i r s t t w o i n s t r u c t i o n s i n t h i s
* bundle g e t e x e c u t e d . T h e r e m a i n i n g c o d e m u s t b e s a f e e v e n i f
* they d o n o t g e t e x e c u t e d .
* /
2005-04-28 08:20:11 +04:00
adds r17 = - 1 0 2 4 ,r15 / / A
mov r10 =0 / / A d e f a u l t t o s u c c e s s f u l s y s c a l l e x e c u t i o n
epc / / B c a u s e s s p l i t - i s s u e
2005-04-17 02:20:36 +04:00
}
;;
2005-04-28 08:22:40 +04:00
rsm p s r . b e | p s r . i / / M 2 ( 5 c y c t o s r l z . d )
2005-04-28 08:20:11 +04:00
LOAD_ F S Y S C A L L _ T A B L E ( r14 ) / / X
2005-04-28 08:19:37 +04:00
;;
2005-04-28 08:20:11 +04:00
mov r16 =IA64_KR ( C U R R E N T ) / / M 2 ( 1 2 c y c )
shladd r18 =r17 ,3 ,r14 / / A
mov r19 =NR_syscalls - 1 / / A
2005-04-17 02:20:36 +04:00
;;
2005-04-28 08:19:37 +04:00
lfetch [ r18 ] / / M 0 | 1
2005-04-28 08:20:11 +04:00
mov r29 =psr / / M 2 ( 1 2 c y c )
/ / If r17 i s a N a T , p6 w i l l b e z e r o
cmp. g e u p6 ,p7 =r19 ,r17 / / A ( s y s n r > 0 & & s y s n r < 1 0 2 4 + N R _ s y s c a l l s ) ?
2005-04-17 02:20:36 +04:00
;;
2005-04-28 08:20:11 +04:00
mov r21 =ar . f p s r / / M 2 ( 1 2 c y c )
tnat. n z p10 ,p9 =r15 / / I 0
mov. i r26 =ar . p f s / / I 0 ( w o u l d s t a l l a n y h o w d u e t o s r l z . d . . . )
2005-04-17 02:20:36 +04:00
;;
2005-04-28 08:20:11 +04:00
srlz. d / / M 0 ( f o r c e s s p l i t - i s s u e ) e n s u r e P S R . B E = =0
( p6 ) l d8 r18 = [ r18 ] / / M 0 | 1
2005-04-28 08:19:37 +04:00
nop. i 0
;;
nop. m 0
2005-04-28 08:20:11 +04:00
( p6 ) t b i t . z . u n c p8 ,p0 =r18 ,0 / / I 0 ( d u a l - i s s u e s w i t h " m o v b7 =r18 " ! )
2005-04-28 08:19:37 +04:00
nop. i 0
2005-04-28 08:22:40 +04:00
;;
( p8 ) s s m p s r . i
( p6 ) m o v b7 =r18 / / I 0
2005-04-28 08:20:11 +04:00
( p8 ) b r . d p t k . m a n y b7 / / B
2005-04-17 02:20:36 +04:00
2005-04-28 08:20:11 +04:00
mov r27 =ar . r s c / / M 2 ( 1 2 c y c )
2005-04-17 02:20:36 +04:00
/ *
* brl. c o n d d o e s n ' t w o r k a s i n t e n d e d b e c a u s e t h e l i n k e r w o u l d c o n v e r t t h i s b r a n c h
* into a b r a n c h t o a P L T . P e r h a p s t h e r e w i l l b e a w a y t o a v o i d t h i s w i t h s o m e
* future v e r s i o n o f t h e l i n k e r . I n t h e m e a n t i m e , w e j u s t u s e a n i n d i r e c t b r a n c h
* instead.
* /
# ifdef C O N F I G _ I T A N I U M
2005-04-28 08:20:11 +04:00
( p6 ) a d d r14 = - 8 ,r14 / / r14 < - a d d r o f f s y s _ b u b b l e _ d o w n e n t r y
2005-04-28 08:19:37 +04:00
;;
2005-04-17 02:20:36 +04:00
( p6 ) l d8 r14 = [ r14 ] / / r14 < - f s y s _ b u b b l e _ d o w n
;;
( p6 ) m o v b7 =r14
( p6 ) b r . s p t k . m a n y b7
# else
BRL_ C O N D _ F S Y S _ B U B B L E _ D O W N ( p6 )
# endif
2005-04-28 08:22:40 +04:00
ssm p s r . i
2005-04-17 02:20:36 +04:00
mov r10 = - 1
( p1 0 ) m o v r8 =EINVAL
( p9 ) m o v r8 =ENOSYS
FSYS_ R E T U R N
END( _ _ k e r n e l _ s y s c a l l _ v i a _ e p c )
# define A R G 0 _ O F F ( 1 6 + I A 6 4 _ S I G F R A M E _ A R G 0 _ O F F S E T )
# define A R G 1 _ O F F ( 1 6 + I A 6 4 _ S I G F R A M E _ A R G 1 _ O F F S E T )
# define A R G 2 _ O F F ( 1 6 + I A 6 4 _ S I G F R A M E _ A R G 2 _ O F F S E T )
# define S I G H A N D L E R _ O F F ( 1 6 + I A 6 4 _ S I G F R A M E _ H A N D L E R _ O F F S E T )
# define S I G C O N T E X T _ O F F ( 1 6 + I A 6 4 _ S I G F R A M E _ S I G C O N T E X T _ O F F S E T )
# define F L A G S _ O F F I A 6 4 _ S I G C O N T E X T _ F L A G S _ O F F S E T
# define C F M _ O F F I A 6 4 _ S I G C O N T E X T _ C F M _ O F F S E T
# define F R 6 _ O F F I A 6 4 _ S I G C O N T E X T _ F R 6 _ O F F S E T
# define B S P _ O F F I A 6 4 _ S I G C O N T E X T _ A R _ B S P _ O F F S E T
# define R N A T _ O F F I A 6 4 _ S I G C O N T E X T _ A R _ R N A T _ O F F S E T
# define U N A T _ O F F I A 6 4 _ S I G C O N T E X T _ A R _ U N A T _ O F F S E T
# define F P S R _ O F F I A 6 4 _ S I G C O N T E X T _ A R _ F P S R _ O F F S E T
# define P R _ O F F I A 6 4 _ S I G C O N T E X T _ P R _ O F F S E T
# define R P _ O F F I A 6 4 _ S I G C O N T E X T _ I P _ O F F S E T
# define S P _ O F F I A 6 4 _ S I G C O N T E X T _ R 1 2 _ O F F S E T
# define R B S _ B A S E _ O F F I A 6 4 _ S I G C O N T E X T _ R B S _ B A S E _ O F F S E T
# define L O A D R S _ O F F I A 6 4 _ S I G C O N T E X T _ L O A D R S _ O F F S E T
# define b a s e 0 r2
# define b a s e 1 r3
/ *
* When w e g e t h e r e , t h e m e m o r y s t a c k l o o k s l i k e t h i s :
*
* + = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +
* | |
* / / struct s i g f r a m e / /
* | |
* + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + < - - sp+ 1 6
* | 1 6 byte o f s c r a t c h |
* | space |
* + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + < - - sp
*
* The r e g i s t e r s t a c k l o o k s _ e x a c t l y _ t h e w a y i t l o o k e d a t t h e t i m e t h e s i g n a l
* occurred. I n o t h e r w o r d s , w e ' r e t r e a d i n g o n a p o t e n t i a l m i n e - f i e l d : e a c h
* incoming g e n e r a l r e g i s t e r m a y b e a N a T v a l u e ( i n c l u d i n g s p , i n w h i c h c a s e t h e
* process e n d s u p d y i n g w i t h a S I G S E G V ) .
*
* The f i r s t t h i n g n e e d t o d o i s a c o v e r t o g e t t h e r e g i s t e r s o n t o t h e b a c k i n g
* store. O n c e t h a t i s d o n e , w e i n v o k e t h e s i g n a l h a n d l e r w h i c h m a y m o d i f y s o m e
* of t h e m a c h i n e s t a t e . A f t e r r e t u r n i n g f r o m t h e s i g n a l h a n d l e r , w e r e t u r n
* control t o t h e p r e v i o u s c o n t e x t b y e x e c u t i n g a s i g r e t u r n s y s t e m c a l l . A s i g n a l
* handler m a y c a l l t h e r t _ s i g r e t u r n ( ) f u n c t i o n t o d i r e c t l y r e t u r n t o a g i v e n
* sigcontext. H o w e v e r , t h e u s e r - l e v e l s i g r e t u r n ( ) n e e d s t o d o m u c h m o r e t h a n
* calling t h e r t _ s i g r e t u r n ( ) s y s t e m c a l l a s i t n e e d s t o u n w i n d t h e s t a c k t o
* restore p r e s e r v e d r e g i s t e r s t h a t m a y h a v e b e e n s a v e d o n t h e s i g n a l h a n d l e r ' s
* call s t a c k .
* /
# define S I G T R A M P _ S A V E S \
.unwabi 3 , ' s' ; /* mark this as a sigtramp handler (saves scratch regs) */ \
.unwabi @svr4, 's'; /* backwards compatibility with old unwinders (remove in v2.7) */ \
.savesp ar. u n a t , U N A T _ O F F + S I G C O N T E X T _ O F F ; \
.savesp ar. f p s r , F P S R _ O F F + S I G C O N T E X T _ O F F ; \
.savesp pr, P R _ O F F + S I G C O N T E X T _ O F F ; \
.savesp rp, R P _ O F F + S I G C O N T E X T _ O F F ; \
.savesp ar. p f s , C F M _ O F F + S I G C O N T E X T _ O F F ; \
.vframesp SP_ O F F + S I G C O N T E X T _ O F F
GLOBAL_ E N T R Y ( _ _ k e r n e l _ s i g t r a m p )
/ / describe t h e s t a t e t h a t i s a c t i v e w h e n w e g e t h e r e :
.prologue
SIGTRAMP_ S A V E S
.body
.label_state 1
adds b a s e 0 =SIGHANDLER_OFF ,s p
adds b a s e 1 =RBS_BASE_OFF + S I G C O N T E X T _ O F F ,s p
br. c a l l . s p t k . m a n y r p =1f
1 :
ld8 r17 = [ b a s e 0 ] ,( A R G 0 _ O F F - S I G H A N D L E R _ O F F ) / / g e t p o i n t e r t o s i g n a l h a n d l e r ' s p l a b e l
ld8 r15 = [ b a s e 1 ] / / g e t a d d r e s s o f n e w R B S b a s e ( o r N U L L )
cover / / p u s h a r g s i n i n t e r r u p t e d f r a m e o n t o b a c k i n g s t o r e
;;
cmp. n e p1 ,p0 =r15 ,r0 / / d o w e n e e d t o s w i t c h r b s ? ( n o t e : p r i s s a v e d b y k e r n e l )
mov. m r9 =ar . b s p / / f e t c h a r . b s p
.spillsp .p p1 , a r . r n a t , R N A T _ O F F + S I G C O N T E X T _ O F F
( p1 ) b r . c o n d . s p n t s e t u p _ r b s / / y u p - > ( c l o b b e r s p8 , r14 - r16 , a n d r18 - r20 )
back_from_setup_rbs :
alloc r8 =ar . p f s ,0 ,0 ,3 ,0
ld8 o u t 0 = [ b a s e 0 ] ,1 6 / / l o a d a r g 0 ( s i g n u m )
adds b a s e 1 = ( A R G 1 _ O F F - ( R B S _ B A S E _ O F F + S I G C O N T E X T _ O F F ) ) ,b a s e 1
;;
ld8 o u t 1 = [ b a s e 1 ] / / l o a d a r g 1 ( s i g i n f o p )
ld8 r10 = [ r17 ] ,8 / / g e t s i g n a l h a n d l e r e n t r y p o i n t
;;
ld8 o u t 2 = [ b a s e 0 ] / / l o a d a r g 2 ( s i g c o n t e x t p )
ld8 g p = [ r17 ] / / g e t s i g n a l h a n d l e r ' s g l o b a l p o i n t e r
adds b a s e 0 = ( B S P _ O F F + S I G C O N T E X T _ O F F ) ,s p
;;
.spillsp ar. b s p , B S P _ O F F + S I G C O N T E X T _ O F F
st8 [ b a s e 0 ] =r9 / / s a v e s c _ a r _ b s p
adds b a s e 0 = ( F R 6 _ O F F + S I G C O N T E X T _ O F F ) ,s p
adds b a s e 1 = ( F R 6 _ O F F + 1 6 + S I G C O N T E X T _ O F F ) ,s p
;;
stf. s p i l l [ b a s e 0 ] =f6 ,3 2
stf. s p i l l [ b a s e 1 ] =f7 ,3 2
;;
stf. s p i l l [ b a s e 0 ] =f8 ,3 2
stf. s p i l l [ b a s e 1 ] =f9 ,3 2
mov b6 =r10
;;
stf. s p i l l [ b a s e 0 ] =f10 ,3 2
stf. s p i l l [ b a s e 1 ] =f11 ,3 2
;;
stf. s p i l l [ b a s e 0 ] =f12 ,3 2
stf. s p i l l [ b a s e 1 ] =f13 ,3 2
;;
stf. s p i l l [ b a s e 0 ] =f14 ,3 2
stf. s p i l l [ b a s e 1 ] =f15 ,3 2
br. c a l l . s p t k . m a n y r p =b6 / / c a l l t h e s i g n a l h a n d l e r
.ret0 : adds b a s e 0 = ( B S P _ O F F + S I G C O N T E X T _ O F F ) ,s p
;;
ld8 r15 = [ b a s e 0 ] / / f e t c h s c _ a r _ b s p
mov r14 =ar . b s p
;;
cmp. n e p1 ,p0 =r14 ,r15 / / d o w e n e e d t o r e s t o r e t h e r b s ?
( p1 ) b r . c o n d . s p n t r e s t o r e _ r b s / / y u p - > ( c l o b b e r s r14 - r18 , f6 & f7 )
;;
back_from_restore_rbs :
adds b a s e 0 = ( F R 6 _ O F F + S I G C O N T E X T _ O F F ) ,s p
adds b a s e 1 = ( F R 6 _ O F F + 1 6 + S I G C O N T E X T _ O F F ) ,s p
;;
ldf. f i l l f6 = [ b a s e 0 ] ,3 2
ldf. f i l l f7 = [ b a s e 1 ] ,3 2
;;
ldf. f i l l f8 = [ b a s e 0 ] ,3 2
ldf. f i l l f9 = [ b a s e 1 ] ,3 2
;;
ldf. f i l l f10 = [ b a s e 0 ] ,3 2
ldf. f i l l f11 = [ b a s e 1 ] ,3 2
;;
ldf. f i l l f12 = [ b a s e 0 ] ,3 2
ldf. f i l l f13 = [ b a s e 1 ] ,3 2
;;
ldf. f i l l f14 = [ b a s e 0 ] ,3 2
ldf. f i l l f15 = [ b a s e 1 ] ,3 2
mov r15 =__NR_rt_sigreturn
.restore sp / / pop . p r o l o g u e
break _ _ B R E A K _ S Y S C A L L
.prologue
SIGTRAMP_ S A V E S
setup_rbs :
mov a r . r s c =0 / / p u t R S E i n t o e n f o r c e d l a z y m o d e
;;
.save ar. r n a t , r19
mov r19 =ar . r n a t / / s a v e R N a T b e f o r e s w i t c h i n g b a c k i n g s t o r e a r e a
adds r14 = ( R N A T _ O F F + S I G C O N T E X T _ O F F ) ,s p
mov r18 =ar . b s p s t o r e
mov a r . b s p s t o r e =r15 / / s w i t c h o v e r t o n e w r e g i s t e r b a c k i n g s t o r e a r e a
;;
.spillsp ar. r n a t , R N A T _ O F F + S I G C O N T E X T _ O F F
st8 [ r14 ] =r19 / / s a v e s c _ a r _ r n a t
.body
mov. m r16 =ar . b s p / / s c _ l o a d r s < - ( n e w b s p - n e w b s p s t o r e ) < < 1 6
adds r14 = ( L O A D R S _ O F F + S I G C O N T E X T _ O F F ) ,s p
;;
invala
sub r15 =r16 ,r15
extr. u r20 =r18 ,3 ,6
;;
mov a r . r s c =0xf / / s e t R S E i n t o e a g e r m o d e , p l 3
cmp. e q p8 ,p0 =63 ,r20
shl r15 =r15 ,1 6
;;
st8 [ r14 ] =r15 / / s a v e s c _ l o a d r s
( p8 ) s t 8 [ r18 ] =r19 / / i f b s p s t o r e p o i n t s a t R N a T s l o t , s t o r e R N a T t h e r e n o w
.restore sp / / pop . p r o l o g u e
br. c o n d . s p t k b a c k _ f r o m _ s e t u p _ r b s
.prologue
SIGTRAMP_ S A V E S
.spillsp ar. r n a t , R N A T _ O F F + S I G C O N T E X T _ O F F
.body
restore_rbs :
/ / On i n p u t :
/ / r1 4 = b s p1 ( b s p a t t h e t i m e o f r e t u r n f r o m s i g n a l h a n d l e r )
/ / r1 5 = b s p0 ( b s p a t t h e t i m e t h e s i g n a l o c c u r r e d )
/ /
/ / Here, w e n e e d t o c a l c u l a t e b s p s t o r e 0 , t h e v a l u e t h a t a r . b s p s t o r e n e e d s
/ / to b e s e t t o , b a s e d o n b s p0 a n d t h e s i z e o f t h e d i r t y p a r t i t i o n o n
/ / the a l t e r n a t e s t a c k ( s c _ l o a d r s > > 1 6 ) . T h i s c a n b e d o n e w i t h t h e
/ / following a l g o r i t h m :
/ /
/ / bspstore0 = r s e _ s k i p _ r e g s ( b s p0 , - r s e _ n u m _ r e g s ( b s p1 - ( l o a d r s > > 1 9 ) , b s p1 ) ) ;
/ /
/ / This i s w h a t t h e c o d e b e l o w d o e s .
/ /
alloc r2 =ar . p f s ,0 ,0 ,0 ,0 / / a l l o c n u l l f r a m e
adds r16 = ( L O A D R S _ O F F + S I G C O N T E X T _ O F F ) ,s p
adds r18 = ( R N A T _ O F F + S I G C O N T E X T _ O F F ) ,s p
;;
ld8 r17 = [ r16 ]
ld8 r16 = [ r18 ] / / g e t n e w r n a t
extr. u r18 =r15 ,3 ,6 / / r18 < - r s e _ s l o t _ n u m ( b s p0 )
;;
mov a r . r s c =r17 / / p u t R S E i n t o e n f o r c e d l a z y m o d e
shr. u r17 =r17 ,1 6
;;
sub r14 =r14 ,r17 / / r14 ( b s p s t o r e 1 ) < - b s p1 - ( s c _ l o a d r s > > 1 6 )
shr. u r17 =r17 ,3 / / r17 < - ( s c _ l o a d r s > > 1 9 )
;;
loadrs / / r e s t o r e d i r t y p a r t i t i o n
extr. u r14 =r14 ,3 ,6 / / r14 < - r s e _ s l o t _ n u m ( b s p s t o r e 1 )
;;
add r14 =r14 ,r17 / / r14 < - r s e _ s l o t _ n u m ( b s p s t o r e 1 ) + ( s c _ l o a d r s > > 1 9 )
;;
shr. u r14 =r14 ,6 / / r14 < - ( r s e _ s l o t _ n u m ( b s p s t o r e 1 ) + ( s c _ l o a d r s > > 1 9 ) ) / 0 x40
;;
sub r14 =r14 ,r17 / / r14 < - - r s e _ n u m _ r e g s ( b s p s t o r e 1 , b s p1 )
movl r17 =0x8208208208208209
;;
add r18 =r18 ,r14 / / r18 ( d e l t a ) < - r s e _ s l o t _ n u m ( b s p0 ) - r s e _ n u m _ r e g s ( b s p s t o r e 1 ,b s p1 )
setf. s i g f7 =r17
cmp. l t p7 ,p0 =r14 ,r0 / / p7 < - ( r14 < 0 ) ?
;;
( p7 ) a d d s r18 = - 6 2 ,r18 / / d e l t a - = 6 2
;;
setf. s i g f6 =r18
;;
xmpy. h f6 =f6 ,f7
;;
getf. s i g r17 =f6
;;
add r17 =r17 ,r18
shr r18 =r18 ,6 3
;;
shr r17 =r17 ,5
;;
sub r17 =r17 ,r18 / / r17 = d e l t a / 6 3
;;
add r17 =r14 ,r17 / / r17 < - d e l t a / 6 3 - r s e _ n u m _ r e g s ( b s p s t o r e 1 , b s p1 )
;;
shladd r15 =r17 ,3 ,r15 / / r15 < - b s p0 + 8 * ( d e l t a / 6 3 - r s e _ n u m _ r e g s ( b s p s t o r e 1 , b s p1 ) )
;;
mov a r . b s p s t o r e =r15 / / s w i t c h b a c k t o o l d r e g i s t e r b a c k i n g s t o r e a r e a
;;
mov a r . r n a t =r16 / / r e s t o r e R N a T
mov a r . r s c =0xf / / ( w i l l b e r e s t o r e d l a t e r o n f r o m s c _ a r _ r s c )
/ / invala n o t n e c e s s a r y a s t h a t w i l l h a p p e n w h e n r e t u r n i n g t o u s e r - m o d e
br. c o n d . s p t k b a c k _ f r o m _ r e s t o r e _ r b s
END( _ _ k e r n e l _ s i g t r a m p )