2005-04-16 15:20:36 -07:00
/ *
* linux/ a r c h / a r m / v f p / e n t r y . S
*
* Copyright ( C ) 2 0 0 4 A R M L i m i t e d .
* Written b y D e e p B l u e S o l u t i o n s L i m i t e d .
*
* 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 .
* /
2014-04-02 10:57:48 +01:00
# include < l i n u x / i n i t . h >
# include < l i n u x / l i n k a g e . h >
2009-04-01 20:27:18 +01:00
# include < a s m / t h r e a d _ i n f o . h >
2005-04-16 15:20:36 -07:00
# include < a s m / v f p m a c r o s . h >
2014-04-02 10:57:48 +01:00
# include < a s m / a s s e m b l e r . h >
# include < a s m / a s m - o f f s e t s . h >
2005-04-16 15:20:36 -07:00
2012-07-30 19:42:10 +01:00
@ VFP entry point.
@
@ r0 = instruction opcode (32-bit ARM or two 16-bit Thumb)
@ r2 = PC value to resume execution after successful emulation
@ r9 = normal "successful" return address
@ r10 = this threads thread_info structure
@ lr = unrecognised instruction return address
2014-04-22 16:14:29 +01:00
@ IRQs enabled.
2012-07-30 19:42:10 +01:00
@
2008-08-28 11:22:32 +01:00
ENTRY( d o _ v f p )
2014-04-02 10:57:49 +01:00
inc_ p r e e m p t _ c o u n t r10 , r4
2005-04-16 15:20:36 -07:00
ldr r4 , . L C v f p
2007-01-24 18:47:08 +01:00
ldr r11 , [ r10 , #T I _ C P U ] @ C P U n u m b e r
2005-04-16 15:20:36 -07:00
add r10 , r10 , #T I _ V F P S T A T E @ r 10 = w o r k s p a c e
ldr p c , [ r4 ] @ call VFP entry point
2008-08-28 11:22:32 +01:00
ENDPROC( d o _ v f p )
2005-04-16 15:20:36 -07:00
2007-06-10 12:22:20 +01:00
ENTRY( v f p _ n u l l _ e n t r y )
2014-04-02 10:57:49 +01:00
dec_ p r e e m p t _ c o u n t _ t i r10 , r4
2014-06-30 16:29:12 +01:00
ret l r
2007-06-10 12:22:20 +01:00
ENDPROC( v f p _ n u l l _ e n t r y )
2009-07-24 12:32:52 +01:00
.align 2
2005-04-16 15:20:36 -07:00
.LCvfp :
.word vfp_vector
@ This code is called if the VFP does not exist. It needs to flag the
@ failure to the VFP initialisation code.
_ _ INIT
2008-08-28 11:22:32 +01:00
ENTRY( v f p _ t e s t i n g _ e n t r y )
2014-04-02 10:57:49 +01:00
dec_ p r e e m p t _ c o u n t _ t i r10 , r4
2005-04-16 15:20:36 -07:00
ldr r0 , V F P _ a r c h _ a d d r e s s
2013-05-16 19:38:51 +01:00
str r0 , [ r0 ] @ set to non-zero value
2014-06-30 16:29:12 +01:00
ret r9 @ we have handled the fault
2008-08-28 11:22:32 +01:00
ENDPROC( v f p _ t e s t i n g _ e n t r y )
2005-04-16 15:20:36 -07:00
2009-07-24 12:32:52 +01:00
.align 2
2005-04-16 15:20:36 -07:00
VFP_arch_address :
.word VFP_arch
_ _ FINIT