[Openmcl-cvs-notifications] r10803 - /trunk/source/lisp-kernel/x86-exceptions.h
rme at clozure.com
rme at clozure.com
Wed Sep 17 22:29:21 EDT 2008
Author: rme
Date: Wed Sep 17 22:29:21 2008
New Revision: 10803
Log:
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)
Modified:
trunk/source/lisp-kernel/x86-exceptions.h
Modified: trunk/source/lisp-kernel/x86-exceptions.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/x86-exceptions.h (original)
+++ trunk/source/lisp-kernel/x86-exceptions.h Wed Sep 17 22:29:21 2008
@@ -39,7 +39,7 @@
#define xpPC(x) (xpGPR(x,Iip))
#define eflags_register(xp) xpGPR(xp,Iflags)
#define xpFPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__fs.__fpu_xmm0)))
-#define xpMMXreg(x,n) (xpFPRvector(x)[n])
+#define xpMMXreg(x,n) ((natural *)(&(x)->uc_mcontext->__fs.__fpu_stmm0))[n]
#else /* X8632 */
#define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext->__ss.__eax)))
#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
@@ -47,8 +47,7 @@
#define xpPC(x) (xpGPR(x,Iip))
#define eflags_register(xp) xpGPR(xp,Iflags)
#define xpFPRvector(x) ((natural *)(&((x)->uc_mcontext->__fs.__fpu_xmm0)))
-/* are you ready for this? */
-#define xpMMXreg(x,n) *((natural *)&((&((x)->uc_mcontext->__fs.__fpu_stmm0=
))[n]))
+#define xpMMXreg(x,n) ((natural *)(&(x)->uc_mcontext->__fs.__fpu_stmm0))[n]
#endif
#include <mach/mach.h>
#include <mach/mach_error.h>
More information about the Openmcl-cvs-notifications
mailing list