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 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 632 void OPPROTO op_into(void)
... ... @@ -638,12 +639,6 @@ void OPPROTO op_into(void)
638 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 642 void OPPROTO op_cli(void)
648 643 {
649 644 env->eflags &= ~IF_MASK;
... ...
opc-i386.h
... ... @@ -230,13 +230,10 @@ DEF(add_bitl_A0_T1, 0)
230 230 DEF(jmp_T0, 0)
231 231 DEF(jmp_im, 1)
232 232 DEF(int_im, 2)
233   -DEF(int3, 1)
  233 +DEF(raise_exception, 2)
234 234 DEF(into, 0)
235   -DEF(gpf, 1)
236 235 DEF(cli, 0)
237 236 DEF(sti, 0)
238   -DEF(cli_vm, 0)
239   -DEF(sti_vm, 1)
240 237 DEF(boundw, 0)
241 238 DEF(boundl, 0)
242 239 DEF(cmpxchg8b, 0)
... ... @@ -557,11 +554,8 @@ DEF(xor_T0_1, 0)
557 554 DEF(set_cc_op, 1)
558 555 DEF(movl_eflags_T0, 0)
559 556 DEF(movw_eflags_T0, 0)
560   -DEF(movw_eflags_T0_vm, 1)
561   -DEF(movl_eflags_T0_vm, 1)
562 557 DEF(movb_eflags_T0, 0)
563 558 DEF(movl_T0_eflags, 0)
564   -DEF(movl_T0_eflags_vm, 0)
565 559 DEF(cld, 0)
566 560 DEF(std, 0)
567 561 DEF(clc, 0)
... ...