Rev 73 | Rev 84 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 73 | Rev 75 | ||
---|---|---|---|
Line 86... | Line 86... | ||
86 | } |
86 | } |
87 | 87 | ||
88 | void nm_fault(__u8 n, __u32 stack[]) |
88 | void nm_fault(__u8 n, __u32 stack[]) |
89 | { |
89 | { |
90 | 90 | ||
91 | if (((CPU->arch).fpu_owner)!=NULL) |
91 | if ((CPU->fpu_owner)!=NULL) |
92 | { |
92 | { |
93 | fpu_lazy_context_save(&(((CPU->arch).fpu_owner)->saved_fpu_context)); |
93 | fpu_lazy_context_save(&((CPU->fpu_owner)->saved_fpu_context)); |
94 | ((CPU->arch).fpu_owner)->fpu_context_engaged=0; /* Enables migration */ |
94 | (CPU->fpu_owner)->fpu_context_engaged=0; /* Enables migration */ |
95 | } |
95 | } |
96 | 96 | ||
97 | if(THREAD->fpu_context_exists) fpu_lazy_context_restore(&(THREAD->saved_fpu_context)); |
97 | if(THREAD->fpu_context_exists) fpu_lazy_context_restore(&(THREAD->saved_fpu_context)); |
98 | else {fpu_init();THREAD->fpu_context_exists=1;} |
98 | else {fpu_init();THREAD->fpu_context_exists=1;} |
99 | 99 | ||
100 | (CPU->arch).fpu_owner=THREAD; |
100 | CPU->fpu_owner=THREAD; |
101 | 101 | ||
102 | reset_TS_flag(); |
102 | reset_TS_flag(); |
103 | 103 | ||
104 | // panic("#NM fault\n"); |
104 | // panic("#NM fault\n"); |
105 | } |
105 | } |