mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 08:33:14 +01:00
Enable arg reversal on x86 by default. Make change to TypeInfo_Struct.compare to accomodate for it.
This commit is contained in:
@@ -38,8 +38,8 @@ end
|
||||
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"
|
||||
|
||||
@@ -800,7 +800,11 @@ class TypeInfo_Struct : TypeInfo
|
||||
{ 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);
|
||||
|
||||
Reference in New Issue
Block a user