Ticket #89: softfloat.patch

File softfloat.patch, 4.1 KB (added by Jiri Gaisler, on Dec 3, 2006 at 1:31:13 PM)

softfloat.patch

Line 
1===================================================================
2RCS file: /usr1/CVS/rtems/c/src/exec/score/macros/rtems/score/thread.inl,v
3retrieving revision 1.10
4retrieving revision 1.11
5diff -u -r1.10 -r1.11
6--- rtems/c/src/exec/score/macros/rtems/score/thread.inl        1999/11/17 17:50:38     1.10
7+++ rtems/c/src/exec/score/macros/rtems/score/thread.inl        2000/07/26 19:26:27     1.11
8@@ -10,7 +10,7 @@
9  *  found in the file LICENSE in this distribution or at
10  *  http://www.OARcorp.com/rtems/license.html.
11  *
12- *  $Id: thread.inl,v 1.10 1999/11/17 17:50:38 joel Exp $
13+ *  $Id: thread.inl,v 1.11 2000/07/26 19:26:27 joel Exp $
14  */
15 
16 #ifndef __THREAD_inl
17@@ -67,6 +67,7 @@
18  *
19  */
20 
21+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
22 #define _Thread_Restart_self()  \
23   {  \
24      if ( _Thread_Executing->fp_context != NULL ) \
25@@ -74,6 +75,12 @@
26      \
27     _CPU_Context_Restart_self( &_Thread_Executing->Registers ); \
28   }
29+#else
30+#define _Thread_Restart_self()  \
31+  {  \
32+    _CPU_Context_Restart_self( &_Thread_Executing->Registers ); \
33+  }
34+#endif
35 
36 /*PAGE
37  *
38@@ -96,8 +103,10 @@
39  *
40  */
41 
42+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
43 #define _Thread_Is_allocated_fp( _the_thread ) \
44         ( (_the_thread) == _Thread_Allocated_fp )
45+#endif
46 
47 /*PAGE
48  *
49@@ -105,8 +114,10 @@
50  *
51  */
52 
53+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
54 #define _Thread_Deallocate_fp() \
55         _Thread_Allocated_fp = NULL
56+#endif
57 
58 /*PAGE
59  *
60===================================================================
61RCS file: /usr1/CVS/rtems/c/src/exec/score/inline/rtems/score/thread.inl,v
62retrieving revision 1.14
63retrieving revision 1.15
64diff -u -r1.14 -r1.15
65--- rtems/c/src/exec/score/inline/rtems/score/thread.inl        1999/11/17 17:50:37     1.14
66+++ rtems/c/src/exec/score/inline/rtems/score/thread.inl        2000/07/26 19:26:27     1.15
67@@ -10,7 +10,7 @@
68  *  found in the file LICENSE in this distribution or at
69  *  http://www.OARcorp.com/rtems/license.html.
70  *
71- *  $Id: thread.inl,v 1.14 1999/11/17 17:50:37 joel Exp $
72+ *  $Id: thread.inl,v 1.15 2000/07/26 19:26:27 joel Exp $
73  */
74 
75 #ifndef __THREAD_inl
76@@ -111,8 +111,10 @@
77 
78 RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
79 {
80+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
81   if ( _Thread_Executing->fp_context != NULL )
82     _Context_Restore_fp( &_Thread_Executing->fp_context );
83+#endif
84 
85   _CPU_Context_Restart_self( &_Thread_Executing->Registers );
86 }
87@@ -144,12 +146,14 @@
88  *  FALSE otherwise.
89  */
90 
91+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
92 RTEMS_INLINE_ROUTINE boolean _Thread_Is_allocated_fp (
93   Thread_Control *the_thread
94 )
95 {
96   return ( the_thread == _Thread_Allocated_fp );
97 }
98+#endif
99 
100 /*PAGE
101  *
102@@ -161,10 +165,12 @@
103  *  point context is now longer associated with an active thread.
104  */
105 
106+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
107 RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
108 {
109   _Thread_Allocated_fp = NULL;
110 }
111+#endif
112 
113 /*PAGE
114  *
115===================================================================
116RCS file: /usr1/CVS/rtems/c/src/exec/score/src/threadclose.c,v
117retrieving revision 1.3
118retrieving revision 1.4
119diff -u -r1.3 -r1.4
120--- rtems/c/src/exec/score/src/threadclose.c    1999/11/17 17:50:40   
1211.3
122+++ rtems/c/src/exec/score/src/threadclose.c    2000/07/26 19:26:28   
1231.4
124@@ -9,7 +9,7 @@
125  *  found in found in the file LICENSE in this distribution or at
126  *  http://www.OARcorp.com/rtems/license.html.
127  *
128- *  $Id: threadclose.c,v 1.3 1999/11/17 17:50:40 joel Exp $
129+ *  $Id: threadclose.c,v 1.4 2000/07/26 19:26:28 joel Exp $
130  */
131 
132 #include <rtems/system.h>
133@@ -53,6 +53,7 @@
134 
135   _User_extensions_Thread_delete( the_thread );
136 
137+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
138 #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
139   if ( _Thread_Is_allocated_fp( the_thread ) )
140     _Thread_Deallocate_fp();
141@@ -60,7 +61,8 @@
142   the_thread->fp_context = NULL;
143 
144   if ( the_thread->Start.fp_context )
145-  (void) _Workspace_Free( the_thread->Start.fp_context );
146+    (void) _Workspace_Free( the_thread->Start.fp_context );
147+#endif
148 
149   _Thread_Stack_Free( the_thread );