Revision 8f091a59 target-i386/helper.c

b/target-i386/helper.c
1334 1334
        ECX = env->cpuid_model[(index - 0x80000002) * 4 + 2];
1335 1335
        EDX = env->cpuid_model[(index - 0x80000002) * 4 + 3];
1336 1336
        break;
1337
    case 0x80000005:
1338
        /* cache info (L1 cache) */
1339
        EAX = 0x01ff01ff;
1340
        EBX = 0x01ff01ff;
1341
        ECX = 0x40020140;
1342
        EDX = 0x40020140;
1343
        break;
1344
    case 0x80000006:
1345
        /* cache info (L2 cache) */
1346
        EAX = 0;
1347
        EBX = 0x42004200;
1348
        ECX = 0x02008140;
1349
        EDX = 0;
1350
        break;
1337 1351
    case 0x80000008:
1338 1352
        /* virtual & phys address size in low 2 bytes. */
1339 1353
        EAX = 0x00003028;
......
1383 1397
    }
1384 1398
}
1385 1399

  
1400
#ifdef TARGET_X86_64
1401
void helper_enter64_level(int level, int data64)
1402
{
1403
    target_ulong esp, ebp;
1404
    ebp = EBP;
1405
    esp = ESP;
1406

  
1407
    if (data64) {
1408
        /* 64 bit */
1409
        esp -= 8;
1410
        while (--level) {
1411
            esp -= 8;
1412
            ebp -= 8;
1413
            stq(esp, ldq(ebp));
1414
        }
1415
        esp -= 8;
1416
        stq(esp, T1);
1417
    } else {
1418
        /* 16 bit */
1419
        esp -= 2;
1420
        while (--level) {
1421
            esp -= 2;
1422
            ebp -= 2;
1423
            stw(esp, lduw(ebp));
1424
        }
1425
        esp -= 2;
1426
        stw(esp, T1);
1427
    }
1428
}
1429
#endif
1430

  
1386 1431
void helper_lldt_T0(void)
1387 1432
{
1388 1433
    int selector;
......
1963 2008
#endif
1964 2009
        sp_mask = get_sp_mask(env->segs[R_SS].flags);
1965 2010
    sp = ESP;
2011
    /* XXX: ssp is zero in 64 bit ? */
1966 2012
    ssp = env->segs[R_SS].base;
1967 2013
    new_eflags = 0; /* avoid warning */
1968 2014
#ifdef TARGET_X86_64
......
2271 2317
    env->dr[reg] = T0;
2272 2318
}
2273 2319

  
2274
void helper_invlpg(unsigned int addr)
2320
void helper_invlpg(target_ulong addr)
2275 2321
{
2276 2322
    cpu_x86_flush_tlb(env, addr);
2277 2323
}
......
2332 2378
    case MSR_STAR:
2333 2379
        env->star = val;
2334 2380
        break;
2381
    case MSR_PAT:
2382
        env->pat = val;
2383
        break;
2335 2384
#ifdef TARGET_X86_64
2336 2385
    case MSR_LSTAR:
2337 2386
        env->lstar = val;
......
2380 2429
    case MSR_STAR:
2381 2430
        val = env->star;
2382 2431
        break;
2432
    case MSR_PAT:
2433
        val = env->pat;
2434
        break;
2383 2435
#ifdef TARGET_X86_64
2384 2436
    case MSR_LSTAR:
2385 2437
        val = env->lstar;

Also available in: Unified diff