* basic-simd.cs (Main): Pass args to the test driver.
+2009-07-20 Geoff Norton <gnorton@novell.com>
+
+ * mini-x86.h: Fix the x86 version guards to use Apple's
+ properly defined macros.
+
2009-07-20 Geoff Norton <gnorton@novell.com>
* mini-x86.c: Fix --trace on darwin-x86 and other systems which require
#if defined(__FreeBSD__) || defined(__APPLE__)
#include <ucontext.h>
#endif
+#if defined(__APPLE__)
+#include <AvailabilityMacros.h>
+#endif
#if defined(__FreeBSD__)
#define UCONTEXT_REG_EAX(ctx) ((ctx)->uc_mcontext.mc_eax)
#define UCONTEXT_REG_ESI(ctx) ((ctx)->uc_mcontext.mc_esi)
#define UCONTEXT_REG_EDI(ctx) ((ctx)->uc_mcontext.mc_edi)
#define UCONTEXT_REG_EIP(ctx) ((ctx)->uc_mcontext.mc_eip)
-#elif defined(__APPLE__) && defined(_STRUCT_MCONTEXT)
+#elif defined(__APPLE__)
+# if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
#define UCONTEXT_REG_EAX(ctx) ((ctx)->uc_mcontext->__ss.__eax)
#define UCONTEXT_REG_EBX(ctx) ((ctx)->uc_mcontext->__ss.__ebx)
#define UCONTEXT_REG_ECX(ctx) ((ctx)->uc_mcontext->__ss.__ecx)
#define UCONTEXT_REG_ESI(ctx) ((ctx)->uc_mcontext->__ss.__esi)
#define UCONTEXT_REG_EDI(ctx) ((ctx)->uc_mcontext->__ss.__edi)
#define UCONTEXT_REG_EIP(ctx) ((ctx)->uc_mcontext->__ss.__eip)
-#elif defined(__APPLE__) && !defined(_STRUCT_MCONTEXT)
+# else
#define UCONTEXT_REG_EAX(ctx) ((ctx)->uc_mcontext->ss.eax)
#define UCONTEXT_REG_EBX(ctx) ((ctx)->uc_mcontext->ss.ebx)
#define UCONTEXT_REG_ECX(ctx) ((ctx)->uc_mcontext->ss.ecx)
#define UCONTEXT_REG_ESI(ctx) ((ctx)->uc_mcontext->ss.esi)
#define UCONTEXT_REG_EDI(ctx) ((ctx)->uc_mcontext->ss.edi)
#define UCONTEXT_REG_EIP(ctx) ((ctx)->uc_mcontext->ss.eip)
+# endif
#elif defined(__NetBSD__)
#define UCONTEXT_REG_EAX(ctx) ((ctx)->uc_mcontext.__gregs [_REG_EAX])
#define UCONTEXT_REG_EBX(ctx) ((ctx)->uc_mcontext.__gregs [_REG_EBX])