~jderose/ubuntu/raring/qemu/vde-again

« back to all changes in this revision

Viewing changes to target-i386/translate.c

Tags: upstream-0.9.0+20070816
ImportĀ upstreamĀ versionĀ 0.9.0+20070816

Show diffs side-by-side

added added

removed removed

Lines of Context:
2245
2245
}
2246
2246
 
2247
2247
/* an interrupt is different from an exception because of the
2248
 
   priviledge checks */
 
2248
   privilege checks */
2249
2249
static void gen_interrupt(DisasContext *s, int intno, 
2250
2250
                          target_ulong cur_eip, target_ulong next_eip)
2251
2251
{
2277
2277
    if (s->singlestep_enabled) {
2278
2278
        gen_op_debug();
2279
2279
    } else if (s->tf) {
2280
 
        gen_op_raise_exception(EXCP01_SSTP);
 
2280
        gen_op_single_step();
2281
2281
    } else {
2282
2282
        gen_op_movl_T0_0();
2283
2283
        gen_op_exit_tb();
3797
3797
        mod = (modrm >> 6) & 3;
3798
3798
        if (mod == 3)
3799
3799
            goto illegal_op;
 
3800
        gen_jmp_im(pc_start - s->cs_base);
3800
3801
        if (s->cc_op != CC_OP_DYNAMIC)
3801
3802
            gen_op_set_cc_op(s->cc_op);
3802
3803
        gen_lea_modrm(s, modrm, &reg_addr, &offset_addr);
5326
5327
        if (CODE64(s))
5327
5328
            goto illegal_op;
5328
5329
        val = ldub_code(s->pc++);
5329
 
        gen_op_aam(val);
5330
 
        s->cc_op = CC_OP_LOGICB;
 
5330
        if (val == 0) {
 
5331
            gen_exception(s, EXCP00_DIVZ, pc_start - s->cs_base);
 
5332
        } else {
 
5333
            gen_op_aam(val);
 
5334
            s->cc_op = CC_OP_LOGICB;
 
5335
        }
5331
5336
        break;
5332
5337
    case 0xd5: /* aad */
5333
5338
        if (CODE64(s))
6430
6435
 
6431
6436
    opc_ptr = opc_buf + opc_buf_len;
6432
6437
    /* live_flags contains the flags needed by the next instructions
6433
 
       in the code. At the end of the bloc, we consider that all the
 
6438
       in the code. At the end of the block, we consider that all the
6434
6439
       flags are live. */
6435
6440
    live_flags = CC_OSZAPC;
6436
6441
    while (opc_ptr > opc_buf) {