Revision 664e0f19 target-i386/cpu.h

b/target-i386/cpu.h
135 135
#define HF_IOPL_SHIFT       12 /* must be same as eflags */
136 136
#define HF_LMA_SHIFT        14 /* only used on x86_64: long mode active */
137 137
#define HF_CS64_SHIFT       15 /* only used on x86_64: 64 bit code segment  */
138
#define HF_OSFXSR_SHIFT     16 /* CR4.OSFXSR */
138 139
#define HF_VM_SHIFT         17 /* must be same as eflags */
139 140

  
140 141
#define HF_CPL_MASK          (3 << HF_CPL_SHIFT)
......
150 151
#define HF_TS_MASK           (1 << HF_TS_SHIFT)
151 152
#define HF_LMA_MASK          (1 << HF_LMA_SHIFT)
152 153
#define HF_CS64_MASK         (1 << HF_CS64_SHIFT)
154
#define HF_OSFXSR_MASK       (1 << HF_OSFXSR_SHIFT)
153 155

  
154 156
#define CR0_PE_MASK  (1 << 0)
155 157
#define CR0_MP_MASK  (1 << 1)
......
340 342
} SegmentCache;
341 343

  
342 344
typedef union {
343
        uint8_t _b[16];
344
        uint16_t _w[8];
345
        uint32_t _l[4];
346
        uint64_t _q[2];
345
    uint8_t _b[16];
346
    uint16_t _w[8];
347
    uint32_t _l[4];
348
    uint64_t _q[2];
349
    float _s[4];
350
    double _d[2];
347 351
} XMMReg;
348 352

  
349 353
typedef union {
......
357 361
#define XMM_B(n) _b[15 - (n)]
358 362
#define XMM_W(n) _w[7 - (n)]
359 363
#define XMM_L(n) _l[3 - (n)]
364
#define XMM_S(n) _s[3 - (n)]
360 365
#define XMM_Q(n) _q[1 - (n)]
366
#define XMM_D(n) _d[1 - (n)]
361 367

  
362 368
#define MMX_B(n) _b[7 - (n)]
363 369
#define MMX_W(n) _w[3 - (n)]
......
366 372
#define XMM_B(n) _b[n]
367 373
#define XMM_W(n) _w[n]
368 374
#define XMM_L(n) _l[n]
375
#define XMM_S(n) _s[n]
369 376
#define XMM_Q(n) _q[n]
377
#define XMM_D(n) _d[n]
370 378

  
371 379
#define MMX_B(n) _b[n]
372 380
#define MMX_W(n) _w[n]
373 381
#define MMX_L(n) _l[n]
374 382
#endif
383
#define MMX_Q(n) q
375 384

  
376 385
#ifdef TARGET_X86_64
377 386
#define CPU_NB_REGS 16
......
404 413
    unsigned int fpus;
405 414
    unsigned int fpuc;
406 415
    uint8_t fptags[8];   /* 0 = valid, 1 = empty */
407
    CPU86_LDouble fpregs[8];
416
    union {
417
#ifdef USE_X86LDOUBLE
418
        CPU86_LDouble d __attribute__((aligned(16)));
419
#else
420
        CPU86_LDouble d;
421
#endif
422
        MMXReg mmx;
423
    } fpregs[8];
408 424

  
409 425
    /* emulator internal variables */
410 426
    CPU86_LDouble ft0;
......
421 437
    SegmentCache tr;
422 438
    SegmentCache gdt; /* only base and limit are used */
423 439
    SegmentCache idt; /* only base and limit are used */
424
    
440

  
441
    uint32_t mxcsr;
425 442
    XMMReg xmm_regs[CPU_NB_REGS];
426 443
    XMMReg xmm_t0;
444
    MMXReg mmx_t0;
427 445

  
428 446
    /* sysenter registers */
429 447
    uint32_t sysenter_cs;

Also available in: Unified diff