Skip to content

Commit

Permalink
Repair the Windows x86 build
Browse files Browse the repository at this point in the history
  • Loading branch information
swgillespie committed Feb 14, 2017
1 parent ded2990 commit 188c22d
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/vm/i386/jitinterfacex86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
#define MON_DEBUG 1
#endif

class generation;
extern "C" generation generation_table[];

extern "C" void STDCALL JIT_WriteBarrierReg_PreGrow();// JIThelp.asm/JIThelp.s
extern "C" void STDCALL JIT_WriteBarrierReg_PostGrow();// JIThelp.asm/JIThelp.s

Expand Down Expand Up @@ -677,9 +674,9 @@ void JIT_TrialAlloc::EmitCore(CPUSTUBLINKER *psl, CodeLabel *noLock, CodeLabel *
psl->X86EmitIndexRegLoad(kEDX, kECX, offsetof(MethodTable, m_BaseSize));
}

// mov eax, dword ptr [generation_table]
// mov eax, dword ptr [g_generation_table]
psl->Emit8(0xA1);
psl->Emit32((int)(size_t)&generation_table);
psl->Emit32((int)(size_t)&g_generation_table);

// Try the allocation.
// add edx, eax
Expand All @@ -688,17 +685,17 @@ void JIT_TrialAlloc::EmitCore(CPUSTUBLINKER *psl, CodeLabel *noLock, CodeLabel *
if (flags & (ALIGN8 | ALIGN8OBJ))
EmitAlignmentRoundup(psl, kEAX, kEDX, flags); // bump up EDX size by 12 if EAX unaligned (so that we are aligned)

// cmp edx, dword ptr [generation_table+4]
// cmp edx, dword ptr [g_generation_table+4]
psl->Emit16(0x153b);
psl->Emit32((int)(size_t)&generation_table + 4);
psl->Emit32((int)(size_t)&g_generation_table + 4);

// ja noAlloc
psl->X86EmitCondJump(noAlloc, X86CondCode::kJA);

// Fill in the allocation and get out.
// mov dword ptr [generation_table], edx
// mov dword ptr [g_generation_table], edx
psl->Emit16(0x1589);
psl->Emit32((int)(size_t)&generation_table);
psl->Emit32((int)(size_t)&g_generation_table);

if (flags & (ALIGN8 | ALIGN8OBJ))
EmitDummyObject(psl, kEAX, flags);
Expand Down

0 comments on commit 188c22d

Please sign in to comment.