Commit 564c8f9978499a12fc8efd8d3c4af54060d1adcf

Authored by bellard
1 parent c50c0c3f

simplified exception support


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@146 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 5 additions and 16 deletions
op-i386.c
@@ -622,10 +622,11 @@ void OPPROTO op_int_im(void) @@ -622,10 +622,11 @@ void OPPROTO op_int_im(void)
622 raise_exception_err(EXCP0D_GPF, intno * 8 + 2); 622 raise_exception_err(EXCP0D_GPF, intno * 8 + 2);
623 } 623 }
624 624
625 -void OPPROTO op_int3(void) 625 +void OPPROTO op_raise_exception(void)
626 { 626 {
627 - EIP = PARAM1;  
628 - raise_exception(EXCP03_INT3); 627 + int exception_index;
  628 + exception_index = PARAM1;
  629 + raise_exception(exception_index);
629 } 630 }
630 631
631 void OPPROTO op_into(void) 632 void OPPROTO op_into(void)
@@ -638,12 +639,6 @@ void OPPROTO op_into(void) @@ -638,12 +639,6 @@ void OPPROTO op_into(void)
638 FORCE_RET(); 639 FORCE_RET();
639 } 640 }
640 641
641 -void OPPROTO op_gpf(void)  
642 -{  
643 - EIP = PARAM1;  
644 - raise_exception(EXCP0D_GPF);  
645 -}  
646 -  
647 void OPPROTO op_cli(void) 642 void OPPROTO op_cli(void)
648 { 643 {
649 env->eflags &= ~IF_MASK; 644 env->eflags &= ~IF_MASK;
opc-i386.h
@@ -230,13 +230,10 @@ DEF(add_bitl_A0_T1, 0) @@ -230,13 +230,10 @@ DEF(add_bitl_A0_T1, 0)
230 DEF(jmp_T0, 0) 230 DEF(jmp_T0, 0)
231 DEF(jmp_im, 1) 231 DEF(jmp_im, 1)
232 DEF(int_im, 2) 232 DEF(int_im, 2)
233 -DEF(int3, 1) 233 +DEF(raise_exception, 2)
234 DEF(into, 0) 234 DEF(into, 0)
235 -DEF(gpf, 1)  
236 DEF(cli, 0) 235 DEF(cli, 0)
237 DEF(sti, 0) 236 DEF(sti, 0)
238 -DEF(cli_vm, 0)  
239 -DEF(sti_vm, 1)  
240 DEF(boundw, 0) 237 DEF(boundw, 0)
241 DEF(boundl, 0) 238 DEF(boundl, 0)
242 DEF(cmpxchg8b, 0) 239 DEF(cmpxchg8b, 0)
@@ -557,11 +554,8 @@ DEF(xor_T0_1, 0) @@ -557,11 +554,8 @@ DEF(xor_T0_1, 0)
557 DEF(set_cc_op, 1) 554 DEF(set_cc_op, 1)
558 DEF(movl_eflags_T0, 0) 555 DEF(movl_eflags_T0, 0)
559 DEF(movw_eflags_T0, 0) 556 DEF(movw_eflags_T0, 0)
560 -DEF(movw_eflags_T0_vm, 1)  
561 -DEF(movl_eflags_T0_vm, 1)  
562 DEF(movb_eflags_T0, 0) 557 DEF(movb_eflags_T0, 0)
563 DEF(movl_T0_eflags, 0) 558 DEF(movl_T0_eflags, 0)
564 -DEF(movl_T0_eflags_vm, 0)  
565 DEF(cld, 0) 559 DEF(cld, 0)
566 DEF(std, 0) 560 DEF(std, 0)
567 DEF(clc, 0) 561 DEF(clc, 0)