Changeset 10803


Ignore:
Timestamp:
Sep 18, 2008, 2:29:21 AM (11 years ago)
Author:
rme
Message:

Clean up definition of xpMMXreg macro for Darwin/x8632. (What was
I trying to do, win the obfuscated C contest?)

Also correct xpMMXreg macro for Darwin/x8664, even though we don't
use it anywhere. (Fixes ticket:47)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-exceptions.h

    r10773 r10803  
    4040#define eflags_register(xp) xpGPR(xp,Iflags)
    4141#define xpFPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__fs.__fpu_xmm0)))
    42 #define xpMMXreg(x,n)  (xpFPRvector(x)[n])
     42#define xpMMXreg(x,n) ((natural *)(&(x)->uc_mcontext->__fs.__fpu_stmm0))[n]
    4343#else /* X8632 */
    4444#define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext->__ss.__eax)))
     
    4848#define eflags_register(xp) xpGPR(xp,Iflags)
    4949#define xpFPRvector(x) ((natural *)(&((x)->uc_mcontext->__fs.__fpu_xmm0)))
    50 /* are you ready for this? */
    51 #define xpMMXreg(x,n) *((natural *)&((&((x)->uc_mcontext->__fs.__fpu_stmm0))[n]))
     50#define xpMMXreg(x,n) ((natural *)(&(x)->uc_mcontext->__fs.__fpu_stmm0))[n]
    5251#endif
    5352#include <mach/mach.h>
Note: See TracChangeset for help on using the changeset viewer.