2005-04-17 02:20:36 +04:00
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# switch_ t o . S : c o n t e x t s w i t c h o p e r a t i o n
#
# Copyright ( C ) 2 0 0 3 R e d H a t , I n c . A l l R i g h t s R e s e r v e d .
# Written b y D a v i d H o w e l l s ( d h o w e l l s @redhat.com)
#
# 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 i t 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
# as p u b l i s h e d 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 ; either version
# 2 of t h e L i c e n s e , o r ( a t y o u r o p t i o n ) a n y l a t e r v e r s i o n .
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
2006-07-10 15:44:55 +04:00
2005-04-17 02:20:36 +04:00
# include < l i n u x / l i n k a g e . h >
# include < a s m / t h r e a d _ i n f o . h >
# include < a s m / p r o c e s s o r . h >
# include < a s m / r e g i s t e r s . h >
# include < a s m / s p r - r e g s . h >
.macro LEDS val
setlos #~ \ v a l , g r 27
st g r27 ,@(gr30,gr0)
membar
dcf @(gr30,gr0)
.endm
.section .sdata
.balign 8
# address o f f r a m e 0 ( u s e r s p a c e ) o n c u r r e n t k e r n e l s t a c k
.globl __kernel_frame0_ptr
__kernel_frame0_ptr :
2006-07-10 15:44:55 +04:00
.long init_thread_union + THREAD_ S I Z E - F R V _ F R A M E 0 _ S I Z E
2005-04-17 02:20:36 +04:00
# address o f c u r r e n t t a s k
.globl __kernel_current_task
__kernel_current_task :
.long init_task
.section .text
.balign 4
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# struct t a s k _ s t r u c t * _ _ s w i t c h _ t o ( s t r u c t t h r e a d _ s t r u c t * p r e v _ t h r e a d ,
# struct t h r e a d _ s t r u c t * n e x t _ t h r e a d ,
# struct t a s k _ s t r u c t * p r e v )
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
.globl __switch_to
__switch_to :
# save o u t g o i n g p r o c e s s ' s c o n t e x t
sethi. p % h i ( _ _ s w i t c h _ b a c k ) ,g r13
setlo % l o ( _ _ s w i t c h _ b a c k ) ,g r13
movsg l r ,g r12
stdi g r28 ,@(gr8,#__THREAD_FRAME)
sti s p ,@(gr8,#__THREAD_SP)
sti f p ,@(gr8,#__THREAD_FP)
stdi g r12 ,@(gr8,#__THREAD_LR)
stdi g r16 ,@(gr8,#__THREAD_GR(16))
stdi g r18 ,@(gr8,#__THREAD_GR(18))
stdi g r20 ,@(gr8,#__THREAD_GR(20))
stdi g r22 ,@(gr8,#__THREAD_GR(22))
stdi g r24 ,@(gr8,#__THREAD_GR(24))
stdi. p g r26 ,@(gr8,#__THREAD_GR(26))
or g r8 ,g r8 ,g r22
ldi. p @(gr8,#__THREAD_USER),gr8
call s a v e _ u s e r _ r e g s
or g r22 ,g r22 ,g r8
# retrieve t h e n e w c o n t e x t
sethi. p % h i ( _ _ k e r n e l _ f r a m e 0 _ p t r ) ,g r6
setlo % l o ( _ _ k e r n e l _ f r a m e 0 _ p t r ) ,g r6
movsg p s r ,g r4
lddi. p @(gr9,#__THREAD_FRAME),gr10
or g r10 ,g r10 ,g r27 ; save prev for the return value
ldi @(gr11,#4),gr19 ; get new_current->thread_info
lddi @(gr9,#__THREAD_SP),gr12
ldi @(gr9,#__THREAD_LR),gr14
ldi @(gr9,#__THREAD_PC),gr18
ldi. p @(gr9,#__THREAD_FRAME0),gr7
# actually s w i t c h k e r n e l c o n t e x t s w i t h o r d i n a r y e x c e p t i o n s d i s a b l e d
andi g r4 ,#~ P S R _ E T , g r 5
movgs g r5 ,p s r
or. p g r10 ,g r0 ,g r28 ; set __frame
or g r11 ,g r0 ,g r29 ; set __current
or. p g r12 ,g r0 ,s p
or g r13 ,g r0 ,f p
or g r19 ,g r0 ,g r15 ; set __current_thread_info
sti g r7 ,@(gr6,#0) ; set __kernel_frame0_ptr
sti g r29 ,@(gr6,#4) ; set __kernel_current_task
movgs g r14 ,l r
bar
# jump t o _ _ s w i t c h _ b a c k o r r e t _ f r o m _ f o r k a s a p p r o p r i a t e
# - move p r e v t o G R 8
movgs g r4 ,p s r
jmpl. p @(gr18,gr0)
or g r27 ,g r27 ,g r8
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# restore i n c o m i n g p r o c e s s ' s c o n t e x t
# - on e n t r y :
# - SP, F P , L R , G R 1 5 , G R 2 8 a n d G R 2 9 w i l l h a v e b e e n s e t u p a p p r o p r i a t e l y
# - GR8 w i l l p o i n t t o t h e o u t g o i n g t a s k _ s t r u c t
# - GR9 w i l l p o i n t t o t h e i n c o m i n g t h r e a d _ s t r u c t
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
__switch_back :
lddi @(gr9,#__THREAD_GR(16)),gr16
lddi @(gr9,#__THREAD_GR(18)),gr18
lddi @(gr9,#__THREAD_GR(20)),gr20
lddi @(gr9,#__THREAD_GR(22)),gr22
lddi @(gr9,#__THREAD_GR(24)),gr24
lddi @(gr9,#__THREAD_GR(26)),gr26
# fall t h r o u g h i n t o r e s t o r e _ u s e r _ r e g s ( )
ldi. p @(gr9,#__THREAD_USER),gr8
or g r8 ,g r8 ,g r9
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# restore e x t r a g e n e r a l r e g s a n d F P / M e d i a r e g s
# - void * r e s t o r e _ u s e r _ r e g s ( c o n s t s t r u c t u s e r _ c o n t e x t * t a r g e t , v o i d * r e t v a l )
# - on e n t r y :
# - GR8 w i l l p o i n t t o t h e u s e r c o n t e x t t o s w a p i n
# - GR9 w i l l c o n t a i n t h e v a l u e t o b e r e t u r n e d i n G R 8 ( p r e v t a s k o n c o n t e x t s w i t c h )
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
.globl restore_user_regs
restore_user_regs :
movsg h s r0 ,g r6
ori g r6 ,#H S R 0 _ G R H E | H S R 0 _ F R L E | H S R 0 _ F R H E ,g r6
movgs g r6 ,h s r0
movsg h s r0 ,g r6
movsg p s r ,g r7
ori g r7 ,#P S R _ E F | P S R _ E M , g r 7
movgs g r7 ,p s r
movsg p s r ,g r7
srli g r7 ,#24 ,g r7
bar
lddi @(gr8,#__FPMEDIA_MSR(0)),gr4
movgs g r4 ,m s r0
movgs g r5 ,m s r1
lddfi @(gr8,#__FPMEDIA_ACC(0)),fr16
lddfi @(gr8,#__FPMEDIA_ACC(2)),fr18
ldbfi @(gr8,#__FPMEDIA_ACCG(0)),fr20
ldbfi @(gr8,#__FPMEDIA_ACCG(1)),fr21
ldbfi @(gr8,#__FPMEDIA_ACCG(2)),fr22
ldbfi @(gr8,#__FPMEDIA_ACCG(3)),fr23
mwtacc f r16 ,a c c0
mwtacc f r17 ,a c c1
mwtacc f r18 ,a c c2
mwtacc f r19 ,a c c3
mwtaccg f r20 ,a c c g 0
mwtaccg f r21 ,a c c g 1
mwtaccg f r22 ,a c c g 2
mwtaccg f r23 ,a c c g 3
# some C P U s h a v e e x t r a A C C x a n d A C C G x r e g s a n d m a y b e F S R x r e g s
subicc. p g r7 ,#0x50 ,g r0 ,i c c0
subicc g r7 ,#0x31 ,g r0 ,i c c1
beq i c c0 ,#0 ,_ _ r e s t o r e _ a c c _ f r45 1
beq i c c1 ,#0 ,_ _ r e s t o r e _ a c c _ f r55 5
__restore_acc_cont :
# some C P U ' s h a v e G R 3 2 - G R 6 3
setlos #H S R 0 _ F R H E ,g r4
andcc g r6 ,g r4 ,g r0 ,i c c0
beq i c c0 ,#1 ,_ _ r e s t o r e _ s k i p _ g r32 _ g r63
lddi @(gr8,#__INT_GR(32)),gr32
lddi @(gr8,#__INT_GR(34)),gr34
lddi @(gr8,#__INT_GR(36)),gr36
lddi @(gr8,#__INT_GR(38)),gr38
lddi @(gr8,#__INT_GR(40)),gr40
lddi @(gr8,#__INT_GR(42)),gr42
lddi @(gr8,#__INT_GR(44)),gr44
lddi @(gr8,#__INT_GR(46)),gr46
lddi @(gr8,#__INT_GR(48)),gr48
lddi @(gr8,#__INT_GR(50)),gr50
lddi @(gr8,#__INT_GR(52)),gr52
lddi @(gr8,#__INT_GR(54)),gr54
lddi @(gr8,#__INT_GR(56)),gr56
lddi @(gr8,#__INT_GR(58)),gr58
lddi @(gr8,#__INT_GR(60)),gr60
lddi @(gr8,#__INT_GR(62)),gr62
__restore_skip_gr32_gr63 :
# all C P U ' s h a v e F R 0 - F R 3 1
lddfi @(gr8,#__FPMEDIA_FR( 0)),fr0
lddfi @(gr8,#__FPMEDIA_FR( 2)),fr2
lddfi @(gr8,#__FPMEDIA_FR( 4)),fr4
lddfi @(gr8,#__FPMEDIA_FR( 6)),fr6
lddfi @(gr8,#__FPMEDIA_FR( 8)),fr8
lddfi @(gr8,#__FPMEDIA_FR(10)),fr10
lddfi @(gr8,#__FPMEDIA_FR(12)),fr12
lddfi @(gr8,#__FPMEDIA_FR(14)),fr14
lddfi @(gr8,#__FPMEDIA_FR(16)),fr16
lddfi @(gr8,#__FPMEDIA_FR(18)),fr18
lddfi @(gr8,#__FPMEDIA_FR(20)),fr20
lddfi @(gr8,#__FPMEDIA_FR(22)),fr22
lddfi @(gr8,#__FPMEDIA_FR(24)),fr24
lddfi @(gr8,#__FPMEDIA_FR(26)),fr26
lddfi @(gr8,#__FPMEDIA_FR(28)),fr28
lddfi. p @(gr8,#__FPMEDIA_FR(30)),fr30
# some C P U ' s h a v e F R 3 2 - F R 6 3
setlos #H S R 0 _ F R H E ,g r4
andcc g r6 ,g r4 ,g r0 ,i c c0
beq i c c0 ,#1 ,_ _ r e s t o r e _ s k i p _ f r32 _ f r63
lddfi @(gr8,#__FPMEDIA_FR(32)),fr32
lddfi @(gr8,#__FPMEDIA_FR(34)),fr34
lddfi @(gr8,#__FPMEDIA_FR(36)),fr36
lddfi @(gr8,#__FPMEDIA_FR(38)),fr38
lddfi @(gr8,#__FPMEDIA_FR(40)),fr40
lddfi @(gr8,#__FPMEDIA_FR(42)),fr42
lddfi @(gr8,#__FPMEDIA_FR(44)),fr44
lddfi @(gr8,#__FPMEDIA_FR(46)),fr46
lddfi @(gr8,#__FPMEDIA_FR(48)),fr48
lddfi @(gr8,#__FPMEDIA_FR(50)),fr50
lddfi @(gr8,#__FPMEDIA_FR(52)),fr52
lddfi @(gr8,#__FPMEDIA_FR(54)),fr54
lddfi @(gr8,#__FPMEDIA_FR(56)),fr56
lddfi @(gr8,#__FPMEDIA_FR(58)),fr58
lddfi @(gr8,#__FPMEDIA_FR(60)),fr60
lddfi @(gr8,#__FPMEDIA_FR(62)),fr62
__restore_skip_fr32_fr63 :
lddi @(gr8,#__FPMEDIA_FNER(0)),gr4
movsg f n e r0 ,g r4
movsg f n e r1 ,g r5
or. p g r9 ,g r9 ,g r8
bralr
# the F R 4 5 1 a l s o h a s A C C 8 - 1 1 / A C C G 8 - 1 1 r e g s ( b u t n o t 4 - 7 . . . )
__restore_acc_fr451 :
lddfi @(gr8,#__FPMEDIA_ACC(4)),fr16
lddfi @(gr8,#__FPMEDIA_ACC(6)),fr18
ldbfi @(gr8,#__FPMEDIA_ACCG(4)),fr20
ldbfi @(gr8,#__FPMEDIA_ACCG(5)),fr21
ldbfi @(gr8,#__FPMEDIA_ACCG(6)),fr22
ldbfi @(gr8,#__FPMEDIA_ACCG(7)),fr23
mwtacc f r16 ,a c c8
mwtacc f r17 ,a c c9
mwtacc f r18 ,a c c10
mwtacc f r19 ,a c c11
mwtaccg f r20 ,a c c g 8
mwtaccg f r21 ,a c c g 9
mwtaccg f r22 ,a c c g 1 0
mwtaccg f r23 ,a c c g 1 1
bra _ _ r e s t o r e _ a c c _ c o n t
# the F R 5 5 5 a l s o h a s A C C 4 - 7 / A C C G 4 - 7 r e g s a n d a n F S R 0 r e g
__restore_acc_fr555 :
lddfi @(gr8,#__FPMEDIA_ACC(4)),fr16
lddfi @(gr8,#__FPMEDIA_ACC(6)),fr18
ldbfi @(gr8,#__FPMEDIA_ACCG(4)),fr20
ldbfi @(gr8,#__FPMEDIA_ACCG(5)),fr21
ldbfi @(gr8,#__FPMEDIA_ACCG(6)),fr22
ldbfi @(gr8,#__FPMEDIA_ACCG(7)),fr23
mnop. p
mwtacc f r16 ,a c c4
mnop. p
mwtacc f r17 ,a c c5
mnop. p
mwtacc f r18 ,a c c6
mnop. p
mwtacc f r19 ,a c c7
mnop. p
mwtaccg f r20 ,a c c g 4
mnop. p
mwtaccg f r21 ,a c c g 5
mnop. p
mwtaccg f r22 ,a c c g 6
mnop. p
mwtaccg f r23 ,a c c g 7
ldi @(gr8,#__FPMEDIA_FSR(0)),gr4
movgs g r4 ,f s r0
bra _ _ r e s t o r e _ a c c _ c o n t
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# save e x t r a g e n e r a l r e g s a n d F P / M e d i a r e g s
# - void s a v e _ u s e r _ r e g s ( s t r u c t u s e r _ c o n t e x t * t a r g e t )
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
.globl save_user_regs
save_user_regs :
movsg h s r0 ,g r6
ori g r6 ,#H S R 0 _ G R H E | H S R 0 _ F R L E | H S R 0 _ F R H E ,g r6
movgs g r6 ,h s r0
movsg h s r0 ,g r6
movsg p s r ,g r7
ori g r7 ,#P S R _ E F | P S R _ E M , g r 7
movgs g r7 ,p s r
movsg p s r ,g r7
srli g r7 ,#24 ,g r7
bar
movsg f n e r0 ,g r4
movsg f n e r1 ,g r5
stdi. p g r4 ,@(gr8,#__FPMEDIA_FNER(0))
# some C P U ' s h a v e G R 3 2 - G R 6 3
setlos #H S R 0 _ G R H E ,g r4
andcc g r6 ,g r4 ,g r0 ,i c c0
beq i c c0 ,#1 ,_ _ s a v e _ s k i p _ g r32 _ g r63
stdi g r32 ,@(gr8,#__INT_GR(32))
stdi g r34 ,@(gr8,#__INT_GR(34))
stdi g r36 ,@(gr8,#__INT_GR(36))
stdi g r38 ,@(gr8,#__INT_GR(38))
stdi g r40 ,@(gr8,#__INT_GR(40))
stdi g r42 ,@(gr8,#__INT_GR(42))
stdi g r44 ,@(gr8,#__INT_GR(44))
stdi g r46 ,@(gr8,#__INT_GR(46))
stdi g r48 ,@(gr8,#__INT_GR(48))
stdi g r50 ,@(gr8,#__INT_GR(50))
stdi g r52 ,@(gr8,#__INT_GR(52))
stdi g r54 ,@(gr8,#__INT_GR(54))
stdi g r56 ,@(gr8,#__INT_GR(56))
stdi g r58 ,@(gr8,#__INT_GR(58))
stdi g r60 ,@(gr8,#__INT_GR(60))
stdi g r62 ,@(gr8,#__INT_GR(62))
__save_skip_gr32_gr63 :
# all C P U ' s h a v e F R 0 - F R 3 1
stdfi f r0 ,@(gr8,#__FPMEDIA_FR( 0))
stdfi f r2 ,@(gr8,#__FPMEDIA_FR( 2))
stdfi f r4 ,@(gr8,#__FPMEDIA_FR( 4))
stdfi f r6 ,@(gr8,#__FPMEDIA_FR( 6))
stdfi f r8 ,@(gr8,#__FPMEDIA_FR( 8))
stdfi f r10 ,@(gr8,#__FPMEDIA_FR(10))
stdfi f r12 ,@(gr8,#__FPMEDIA_FR(12))
stdfi f r14 ,@(gr8,#__FPMEDIA_FR(14))
stdfi f r16 ,@(gr8,#__FPMEDIA_FR(16))
stdfi f r18 ,@(gr8,#__FPMEDIA_FR(18))
stdfi f r20 ,@(gr8,#__FPMEDIA_FR(20))
stdfi f r22 ,@(gr8,#__FPMEDIA_FR(22))
stdfi f r24 ,@(gr8,#__FPMEDIA_FR(24))
stdfi f r26 ,@(gr8,#__FPMEDIA_FR(26))
stdfi f r28 ,@(gr8,#__FPMEDIA_FR(28))
stdfi. p f r30 ,@(gr8,#__FPMEDIA_FR(30))
# some C P U ' s h a v e F R 3 2 - F R 6 3
setlos #H S R 0 _ F R H E ,g r4
andcc g r6 ,g r4 ,g r0 ,i c c0
beq i c c0 ,#1 ,_ _ s a v e _ s k i p _ f r32 _ f r63
stdfi f r32 ,@(gr8,#__FPMEDIA_FR(32))
stdfi f r34 ,@(gr8,#__FPMEDIA_FR(34))
stdfi f r36 ,@(gr8,#__FPMEDIA_FR(36))
stdfi f r38 ,@(gr8,#__FPMEDIA_FR(38))
stdfi f r40 ,@(gr8,#__FPMEDIA_FR(40))
stdfi f r42 ,@(gr8,#__FPMEDIA_FR(42))
stdfi f r44 ,@(gr8,#__FPMEDIA_FR(44))
stdfi f r46 ,@(gr8,#__FPMEDIA_FR(46))
stdfi f r48 ,@(gr8,#__FPMEDIA_FR(48))
stdfi f r50 ,@(gr8,#__FPMEDIA_FR(50))
stdfi f r52 ,@(gr8,#__FPMEDIA_FR(52))
stdfi f r54 ,@(gr8,#__FPMEDIA_FR(54))
stdfi f r56 ,@(gr8,#__FPMEDIA_FR(56))
stdfi f r58 ,@(gr8,#__FPMEDIA_FR(58))
stdfi f r60 ,@(gr8,#__FPMEDIA_FR(60))
stdfi f r62 ,@(gr8,#__FPMEDIA_FR(62))
__save_skip_fr32_fr63 :
mrdacc a c c0 ,f r4
mrdacc a c c1 ,f r5
stdfi. p f r4 ,@(gr8,#__FPMEDIA_ACC(0))
mrdacc a c c2 ,f r6
mrdacc a c c3 ,f r7
stdfi. p f r6 ,@(gr8,#__FPMEDIA_ACC(2))
mrdaccg a c c g 0 ,f r4
stbfi. p f r4 ,@(gr8,#__FPMEDIA_ACCG(0))
mrdaccg a c c g 1 ,f r5
stbfi. p f r5 ,@(gr8,#__FPMEDIA_ACCG(1))
mrdaccg a c c g 2 ,f r6
stbfi. p f r6 ,@(gr8,#__FPMEDIA_ACCG(2))
mrdaccg a c c g 3 ,f r7
stbfi f r7 ,@(gr8,#__FPMEDIA_ACCG(3))
movsg m s r0 ,g r4
movsg m s r1 ,g r5
stdi g r4 ,@(gr8,#__FPMEDIA_MSR(0))
# some C P U s h a v e e x t r a A C C x a n d A C C G x r e g s a n d m a y b e F S R x r e g s
subicc. p g r7 ,#0x50 ,g r0 ,i c c0
subicc g r7 ,#0x31 ,g r0 ,i c c1
beq i c c0 ,#0 ,_ _ s a v e _ a c c _ f r45 1
beq i c c1 ,#0 ,_ _ s a v e _ a c c _ f r55 5
__save_acc_cont :
lddfi @(gr8,#__FPMEDIA_FR(4)),fr4
lddfi. p @(gr8,#__FPMEDIA_FR(6)),fr6
bralr
# the F R 4 5 1 a l s o h a s A C C 8 - 1 1 / A C C G 8 - 1 1 r e g s ( b u t n o t 4 - 7 . . . )
__save_acc_fr451 :
mrdacc a c c8 ,f r4
mrdacc a c c9 ,f r5
stdfi. p f r4 ,@(gr8,#__FPMEDIA_ACC(4))
mrdacc a c c10 ,f r6
mrdacc a c c11 ,f r7
stdfi. p f r6 ,@(gr8,#__FPMEDIA_ACC(6))
mrdaccg a c c g 8 ,f r4
stbfi. p f r4 ,@(gr8,#__FPMEDIA_ACCG(4))
mrdaccg a c c g 9 ,f r5
stbfi. p f r5 ,@(gr8,#__FPMEDIA_ACCG(5))
mrdaccg a c c g 1 0 ,f r6
stbfi. p f r6 ,@(gr8,#__FPMEDIA_ACCG(6))
mrdaccg a c c g 1 1 ,f r7
stbfi f r7 ,@(gr8,#__FPMEDIA_ACCG(7))
bra _ _ s a v e _ a c c _ c o n t
# the F R 5 5 5 a l s o h a s A C C 4 - 7 / A C C G 4 - 7 r e g s a n d a n F S R 0 r e g
__save_acc_fr555 :
mnop. p
mrdacc a c c4 ,f r4
mnop. p
mrdacc a c c5 ,f r5
stdfi f r4 ,@(gr8,#__FPMEDIA_ACC(4))
mnop. p
mrdacc a c c6 ,f r6
mnop. p
mrdacc a c c7 ,f r7
stdfi f r6 ,@(gr8,#__FPMEDIA_ACC(6))
mnop. p
mrdaccg a c c g 4 ,f r4
stbfi f r4 ,@(gr8,#__FPMEDIA_ACCG(4))
mnop. p
mrdaccg a c c g 5 ,f r5
stbfi f r5 ,@(gr8,#__FPMEDIA_ACCG(5))
mnop. p
mrdaccg a c c g 6 ,f r6
stbfi f r6 ,@(gr8,#__FPMEDIA_ACCG(6))
mnop. p
mrdaccg a c c g 7 ,f r7
stbfi f r7 ,@(gr8,#__FPMEDIA_ACCG(7))
movsg f s r0 ,g r4
sti g r4 ,@(gr8,#__FPMEDIA_FSR(0))
bra _ _ s a v e _ a c c _ c o n t