# HG changeset patch # User Christian Kamm # Date 1225052181 -3600 # Node ID 09b88beffd2da3859ca13f710590979116697479 # Parent 50d01791859cdeb53c9ccb716cf45fa95df283b3 Enable arg reversal on x86 by default. Make change to TypeInfo_Struct.compare to accomodate for it. diff -r 50d01791859c -r 09b88beffd2d premake.lua --- a/premake.lua Sun Oct 26 17:31:05 2008 +0100 +++ b/premake.lua Sun Oct 26 21:16:21 2008 +0100 @@ -38,8 +38,8 @@ io.write("Default target: '"..TRIPLE.."'\n"); -- x86 ABI support -X86_REVERSE_PARAMS = 0 --disabled for now -X86_PASS_IN_EAX = 0 +X86_REVERSE_PARAMS = 1 +X86_PASS_IN_EAX = 0 --disabled for now -- D version - don't change these !!! DMDV1 = "1" diff -r 50d01791859c -r 09b88beffd2d runtime/internal/genobj.d --- a/runtime/internal/genobj.d Sun Oct 26 17:31:05 2008 +0100 +++ b/runtime/internal/genobj.d Sun Oct 26 21:16:21 2008 +0100 @@ -800,7 +800,11 @@ { if (!p2) c = 1; else if (xopCmp) - c = (*xopCmp)(p1, p2); + // the x86 D calling conv requires the this arg to be last here + version(X86) + c = (*xopCmp)(p2, p1); + else + c = (*xopCmp)(p1, p2); else // BUG: relies on the GC not moving objects c = memcmp(p1, p2, m_init.length);