Rev 1161 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1161 | Rev 1198 | ||
---|---|---|---|
Line 140... | Line 140... | ||
140 | pop esi |
140 | pop esi |
141 | pop ecx |
141 | pop ecx |
142 | ret |
142 | ret |
Line 143... | Line 143... | ||
143 | 143 | ||
144 | align 4 |
144 | align 4 |
145 | e7: ;#NM exception handler |
145 | except_7: ;#NM exception handler |
146 | save_ring3_context |
146 | save_ring3_context |
147 | clts |
147 | clts |
148 | mov ax, app_data ; |
148 | mov ax, app_data ; |
149 | mov ds, ax |
149 | mov ds, ax |
Line 179... | Line 179... | ||
179 | iret |
179 | iret |
Line 180... | Line 180... | ||
180 | 180 | ||
181 | iglobal |
181 | iglobal |
182 | fpu_owner dd 0 |
182 | fpu_owner dd 0 |
183 | endg |
- | |
184 | - | ||
185 | reg_eip equ ebp+4 |
- | |
186 | reg_cs equ ebp+8 |
- | |
187 | reg_eflags equ ebp+12 |
- | |
188 | reg_esp equ ebp+16 |
- | |
189 | reg_ss equ ebp+20 |
- | |
190 | - | ||
191 | align 4 |
- | |
192 | except_16: ;fpu native exceptions handler |
- | |
193 | test byte [esp+8+2], 2 |
- | |
194 | jnz v86_except_16 |
- | |
195 | push ebp |
- | |
196 | mov ebp, esp |
- | |
197 | - | ||
198 | push eax |
- | |
199 | push ebx |
- | |
200 | push ecx |
- | |
201 | push edx |
- | |
202 | - | ||
203 | mov ebx, [CURRENT_TASK] |
- | |
204 | shl ebx, 8 |
- | |
205 | - | ||
206 | mov eax, [ebx+SLOT_BASE+APPDATA.fpu_handler] |
- | |
207 | test eax, eax |
- | |
208 | jz .default |
- | |
209 | - | ||
210 | mov ecx, [reg_eip] |
- | |
211 | mov edx, [reg_esp] |
- | |
212 | sub edx, 4 |
- | |
213 | mov [edx], ecx |
- | |
214 | mov [reg_esp], edx |
- | |
215 | mov dword [reg_eip], eax |
- | |
216 | - | ||
217 | pop edx |
- | |
218 | pop ecx |
- | |
219 | pop ebx |
- | |
220 | pop eax |
- | |
221 | - | ||
222 | leave |
- | |
223 | iretd |
- | |
224 | - | ||
225 | .default: |
- | |
226 | pop edx |
- | |
227 | pop ecx |
- | |
228 | pop ebx |
- | |
229 | pop eax |
- | |
230 | leave |
- | |
231 | - | ||
232 | save_ring3_context ;debugger support |
- | |
233 | - | ||
234 | mov bl, 16 |
- | |
235 | jmp exc_c |
- | |
236 | - | ||
237 | align 4 |
- | |
238 | except_19: ;sse exceptions handler |
- | |
239 | test byte [esp+8+2], 2 |
- | |
240 | jnz v86_except_19 |
- | |
241 | push ebp |
- | |
242 | mov ebp, esp |
- | |
243 | - | ||
244 | push eax |
- | |
245 | push ebx |
- | |
246 | push ecx |
- | |
247 | push edx |
- | |
248 | - | ||
249 | mov ebx, [current_slot] |
- | |
250 | - | ||
251 | mov eax, [ebx+APPDATA.sse_handler] |
- | |
252 | test eax, eax |
- | |
253 | jz .default |
- | |
254 | - | ||
255 | mov ecx, [reg_eip] |
- | |
256 | mov edx, [reg_esp] |
- | |
257 | sub edx, 4 |
- | |
258 | mov [edx], ecx |
- | |
259 | mov [reg_esp], edx |
- | |
260 | mov dword [reg_eip], eax |
- | |
261 | - | ||
262 | pop edx |
- | |
263 | pop ecx |
- | |
264 | pop ebx |
- | |
265 | pop eax |
- | |
266 | - | ||
267 | leave |
- | |
268 | iretd |
- | |
269 | - | ||
270 | .default: |
- | |
271 | pop edx |
- | |
272 | pop ecx |
- | |
273 | pop ebx |
- | |
274 | pop eax |
- | |
275 | leave |
- | |
276 | - | ||
277 | save_ring3_context ;debugger support |
- | |
278 | - | ||
279 | mov bl, 19 |
- | |
280 | jmp exc_c |
- | |
281 | - | ||
282 | restore reg_eip |
- | |
283 | restore reg_cs |
- | |
284 | restore reg_eflags |
- | |
285 | restore reg_esp |
- | |
286 | restore reg_ss |
- | |
287 | - |