Diff for /np2/i386c/ia32/exception.c between versions 1.36 and 1.38

version 1.36, 2012/01/08 18:26:39 version 1.38, 2012/06/18 14:30:27
Line 382  interrupt_task_gate(const descriptor_t * Line 382  interrupt_task_gate(const descriptor_t *
         CPU_SET_PREV_ESP();          CPU_SET_PREV_ESP();
   
         if (errorp) {          if (errorp) {
                 XPUSH0(error_code);                  VERBOSE(("interrupt: push error code (%08x)", error_code));
                   if (task_sel.desc.type == CPU_SYSDESC_TYPE_TSS_32) {
                           PUSH0_32(error_code);
                   } else {
                           PUSH0_16(error_code);
                   }
         }          }
   
         /* out of range */          /* out of range */
Line 404  interrupt_intr_or_trap(const descriptor_ Line 409  interrupt_intr_or_trap(const descriptor_
         UINT32 new_ip, new_sp;          UINT32 new_ip, new_sp;
         UINT32 old_ip, old_sp;          UINT32 old_ip, old_sp;
         UINT16 old_cs, old_ss, new_ss;          UINT16 old_cs, old_ss, new_ss;
           BOOL is32bit;
         int exc_errcode;          int exc_errcode;
         int rv;           int rv; 
   
Line 466  interrupt_intr_or_trap(const descriptor_ Line 472  interrupt_intr_or_trap(const descriptor_
                 EXCEPTION(NP_EXCEPTION, exc_errcode);                  EXCEPTION(NP_EXCEPTION, exc_errcode);
         }          }
   
           is32bit = gsdp->type & CPU_SYSDESC_TYPE_32BIT;
         if (!SEG_IS_CONFORMING_CODE(&cs_sel.desc) && (cs_sel.desc.dpl < CPU_STAT_CPL)) {          if (!SEG_IS_CONFORMING_CODE(&cs_sel.desc) && (cs_sel.desc.dpl < CPU_STAT_CPL)) {
                 stacksize = errorp ? 12 : 10;                  stacksize = errorp ? 12 : 10;
                 if (!CPU_STAT_VM86) {                  if (!CPU_STAT_VM86) {
Line 480  interrupt_intr_or_trap(const descriptor_ Line 487  interrupt_intr_or_trap(const descriptor_
                         }                          }
                         stacksize += 8;                          stacksize += 8;
                 }                  }
                 if (gsdp->type & CPU_SYSDESC_TYPE_32BIT) {                  if (is32bit) {
                         stacksize *= 2;                          stacksize *= 2;
                 }                  }
   
Line 531  interrupt_intr_or_trap(const descriptor_ Line 538  interrupt_intr_or_trap(const descriptor_
                 }                  }
   
                 /* check stack room size */                  /* check stack room size */
                 cpu_stack_push_check(ss_sel.idx, &ss_sel.desc, new_sp, stacksize);                  cpu_stack_push_check(ss_sel.idx, &ss_sel.desc, new_sp, stacksize, ss_sel.desc.d);
   
                 /* out of range */                  /* out of range */
                 if (new_ip > cs_sel.desc.u.seg.limit) {                  if (new_ip > cs_sel.desc.u.seg.limit) {
Line 545  interrupt_intr_or_trap(const descriptor_ Line 552  interrupt_intr_or_trap(const descriptor_
                 load_cs(cs_sel.selector, &cs_sel.desc, cs_sel.desc.dpl);                  load_cs(cs_sel.selector, &cs_sel.desc, cs_sel.desc.dpl);
                 CPU_EIP = new_ip;                  CPU_EIP = new_ip;
   
                 if (gsdp->type & CPU_SYSDESC_TYPE_32BIT) {                  if (is32bit) {
                         if (CPU_STAT_VM86) {                          if (CPU_STAT_VM86) {
                                 PUSH0_32(CPU_GS);                                  PUSH0_32(CPU_GS);
                                 PUSH0_32(CPU_FS);                                  PUSH0_32(CPU_FS);
Line 595  interrupt_intr_or_trap(const descriptor_ Line 602  interrupt_intr_or_trap(const descriptor_
                 VERBOSE(("interrupt: INTRA-PRIVILEGE-LEVEL-INTERRUPT"));                  VERBOSE(("interrupt: INTRA-PRIVILEGE-LEVEL-INTERRUPT"));
   
                 stacksize = errorp ? 8 : 6;                  stacksize = errorp ? 8 : 6;
                 if (gsdp->type & CPU_SYSDESC_TYPE_32BIT) {                  if (is32bit) {
                         stacksize *= 2;                          stacksize *= 2;
                 }                  }
   
Line 605  interrupt_intr_or_trap(const descriptor_ Line 612  interrupt_intr_or_trap(const descriptor_
                 } else {                  } else {
                         sp = CPU_SP;                          sp = CPU_SP;
                 }                  }
                 SS_PUSH_CHECK(sp, stacksize);                  /* 17.1 全てのデータ・ディスクリプタの B フラグは、
                    * エクスパンドダウン・セグメントの上位アドレス範囲の
                    * 制御も行う。
                    */
                   SS_PUSH_CHECK1(sp, stacksize, is32bit);
   
                 /* out of range */                  /* out of range */
                 if (new_ip > cs_sel.desc.u.seg.limit) {                  if (new_ip > cs_sel.desc.u.seg.limit) {
Line 616  interrupt_intr_or_trap(const descriptor_ Line 627  interrupt_intr_or_trap(const descriptor_
                 load_cs(cs_sel.selector, &cs_sel.desc, CPU_STAT_CPL);                  load_cs(cs_sel.selector, &cs_sel.desc, CPU_STAT_CPL);
                 CPU_EIP = new_ip;                  CPU_EIP = new_ip;
   
                 if (gsdp->type & CPU_SYSDESC_TYPE_32BIT) {                  if (is32bit) {
                         PUSH0_32(old_flags);                          PUSH0_32(old_flags);
                         PUSH0_32(old_cs);                          PUSH0_32(old_cs);
                         PUSH0_32(old_ip);                          PUSH0_32(old_ip);

Removed from v.1.36  
changed lines
  Added in v.1.38


RetroPC.NET-CVS <cvs@retropc.net>