2012-03-05 11:49:32 +00:00
/ *
* FP/ S I M D s t a t e s a v i n g a n d r e s t o r i n g
*
* Copyright ( C ) 2 0 1 2 A R M L t d .
* Author : Catalin M a r i n a s < c a t a l i n . m a r i n a s @arm.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
* 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 .
*
* This p r o g r a m i s d i s t r i b u t e d i n t h e h o p e t h a t i t w i l l b e u s e f u l ,
* but W I T H O U T A N Y W A R R A N T Y ; without even the implied warranty of
* MERCHANTABILITY o r F I T N E S S F O R A P A R T I C U L A R P U R P O S E . S e e t h e
* GNU G e n e r a l P u b l i c L i c e n s e f o r m o r e d e t a i l s .
*
* You s h o u l d h a v e r e c e i v e d a c o p y 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
* along w i t h t h i s p r o g r a m . I f n o t , s e e < h t t p : / / w w w . g n u . o r g / l i c e n s e s / > .
* /
# include < l i n u x / l i n k a g e . h >
# include < a s m / a s s e m b l e r . h >
2012-11-12 13:24:27 +00:00
# include < a s m / f p s i m d m a c r o s . h >
2012-03-05 11:49:32 +00:00
/ *
* Save t h e F P r e g i s t e r s .
*
* x0 - p o i n t e r t o s t r u c t f p s i m d _ s t a t e
* /
ENTRY( f p s i m d _ s a v e _ s t a t e )
2012-11-12 13:24:27 +00:00
fpsimd_ s a v e x0 , 8
2012-03-05 11:49:32 +00:00
ret
ENDPROC( f p s i m d _ s a v e _ s t a t e )
/ *
* Load t h e F P r e g i s t e r s .
*
* x0 - p o i n t e r t o s t r u c t f p s i m d _ s t a t e
* /
ENTRY( f p s i m d _ l o a d _ s t a t e )
2012-11-12 13:24:27 +00:00
fpsimd_ r e s t o r e x0 , 8
2012-03-05 11:49:32 +00:00
ret
ENDPROC( f p s i m d _ l o a d _ s t a t e )
2014-02-24 15:26:29 +01:00
# ifdef C O N F I G _ K E R N E L _ M O D E _ N E O N
/ *
* Save t h e b o t t o m n F P r e g i s t e r s .
*
* x0 - p o i n t e r t o s t r u c t f p s i m d _ p a r t i a l _ s t a t e
* /
ENTRY( f p s i m d _ s a v e _ p a r t i a l _ s t a t e )
fpsimd_ s a v e _ p a r t i a l x0 , 1 , 8 , 9
ret
2014-07-31 11:05:36 +01:00
ENDPROC( f p s i m d _ s a v e _ p a r t i a l _ s t a t e )
2014-02-24 15:26:29 +01:00
/ *
* Load t h e b o t t o m n F P r e g i s t e r s .
*
* x0 - p o i n t e r t o s t r u c t f p s i m d _ p a r t i a l _ s t a t e
* /
ENTRY( f p s i m d _ l o a d _ p a r t i a l _ s t a t e )
fpsimd_ r e s t o r e _ p a r t i a l x0 , 8 , 9
ret
ENDPROC( f p s i m d _ l o a d _ p a r t i a l _ s t a t e )
# endif