comparison packages/hal/i386/pc/current/src/plf_misc.c @ 143:6b5f480c6929 ecos-sw-2000-12-08

Merge from eCos master repository on 2000-12-08-02:09:36-GMT
author jlarmour
date Fri, 08 Dec 2000 03:30:06 +0000
parents 435cced73e2f
children ac086aa3217e
comparison
equal deleted inserted replaced
142:12eccf9656f3 143:6b5f480c6929
105 if (hal_pc_fpe_owner != me) 105 if (hal_pc_fpe_owner != me)
106 { 106 {
107 if (hal_pc_fpe_owner) 107 if (hal_pc_fpe_owner)
108 { /* Then save his state at the bottom of his stack. */ 108 { /* Then save his state at the bottom of his stack. */
109 stack = cyg_thread_get_stack_base(hal_pc_fpe_owner) ; 109 stack = cyg_thread_get_stack_base(hal_pc_fpe_owner) ;
110 #ifdef CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE
111 // It might well be zero anyway
112 stack += CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE;
113 #endif
110 p = (cyg_uint32*) stack ; 114 p = (cyg_uint32*) stack ;
111 stack = (cyg_addrword_t) &(p[1]); 115 stack = (cyg_addrword_t) &(p[1]);
112 asm("movl %0, %%eax 116 asm("movl %0, %%eax
113 fsave (%%eax)" 117 fsave (%%eax)"
114 : /* No outputs. */ 118 : /* No outputs. */
116 : "eax") ; 120 : "eax") ;
117 p[0] = 0xCAFEBABE ; 121 p[0] = 0xCAFEBABE ;
118 } 122 }
119 hal_pc_fpe_owner = me ; 123 hal_pc_fpe_owner = me ;
120 stack = cyg_thread_get_stack_base(hal_pc_fpe_owner) ; 124 stack = cyg_thread_get_stack_base(hal_pc_fpe_owner) ;
125 #ifdef CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE
126 stack += CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE;
127 #endif
121 p = (cyg_uint32*) stack ; 128 p = (cyg_uint32*) stack ;
122 if (p[0] == 0xCAFEBABE) 129 if (p[0] == 0xCAFEBABE)
123 { 130 {
124 stack = (cyg_addrword_t) &(p[1]) ; 131 stack = (cyg_addrword_t) &(p[1]) ;
125 asm("movl %0, %%eax\n" 132 asm("movl %0, %%eax\n"