Revision 6a15fd12 monitor.c

b/monitor.c
457 457
        } else if (wsize == 4) {
458 458
            flags = 0;
459 459
        } else {
460
                /* as default we use the current CS size */
460
            /* as default we use the current CS size */
461 461
            flags = 0;
462
            if (env && !(env->segs[R_CS].flags & DESC_B_MASK))
463
                flags = 1;
462
            if (env) {
463
#ifdef TARGET_X86_64
464
                if ((env->efer & MSR_EFER_LMA) && 
465
                    (env->segs[R_CS].flags & DESC_L_MASK))
466
                    flags = 2;
467
                else
468
#endif
469
                if (!(env->segs[R_CS].flags & DESC_B_MASK))
470
                    flags = 1;
471
            }
464 472
        }
465 473
#endif
466 474
        monitor_disas(env, addr, count, is_physical, flags);
......
1549 1557
        n = 0;
1550 1558
        break;
1551 1559
    default:
1560
        /* XXX: 64 bit version */
1552 1561
        n = strtoul(pch, &p, 0);
1553 1562
        if (pch == p) {
1554 1563
            expr_error("invalid char in expression");

Also available in: Unified diff