From 5d206db5f054e23d80f0afacc60695f955baf3b4 Mon Sep 17 00:00:00 2001 From: Jonghyun Park Date: Fri, 30 Jun 2017 13:31:00 +0900 Subject: [PATCH] Move JIT_TrialAlloc declaration into jitinterfacex86.cpp (dotnet/coreclr#12562) Commit migrated from https://github.com/dotnet/coreclr/commit/a8ec0b0421c89f0c301c647f95aa336bc45bbf28 --- src/coreclr/src/vm/i386/jitinterfacex86.cpp | 33 +++++++++++++++++++++++++++ src/coreclr/src/vm/jitinterface.h | 35 ----------------------------- 2 files changed, 33 insertions(+), 35 deletions(-) diff --git a/src/coreclr/src/vm/i386/jitinterfacex86.cpp b/src/coreclr/src/vm/i386/jitinterfacex86.cpp index 3e8cbc0..900a48b 100644 --- a/src/coreclr/src/vm/i386/jitinterfacex86.cpp +++ b/src/coreclr/src/vm/i386/jitinterfacex86.cpp @@ -34,6 +34,39 @@ #define MON_DEBUG 1 #endif +#ifdef _TARGET_X86_ +class JIT_TrialAlloc +{ +public: + enum Flags + { + NORMAL = 0x0, + MP_ALLOCATOR = 0x1, + SIZE_IN_EAX = 0x2, + OBJ_ARRAY = 0x4, + ALIGN8 = 0x8, // insert a dummy object to insure 8 byte alignment (until the next GC) + ALIGN8OBJ = 0x10, + NO_FRAME = 0x20, // call is from unmanaged code - don't try to put up a frame + }; + + static void *GenAllocSFast(Flags flags); + static void *GenBox(Flags flags); + static void *GenAllocArray(Flags flags); + static void *GenAllocString(Flags flags); + +private: + static void EmitAlignmentRoundup(CPUSTUBLINKER *psl,X86Reg regTestAlign, X86Reg regToAdj, Flags flags); + static void EmitDummyObject(CPUSTUBLINKER *psl, X86Reg regTestAlign, Flags flags); + static void EmitCore(CPUSTUBLINKER *psl, CodeLabel *noLock, CodeLabel *noAlloc, Flags flags); + static void EmitNoAllocCode(CPUSTUBLINKER *psl, Flags flags); + +#if CHECK_APP_DOMAIN_LEAKS + static void EmitSetAppDomain(CPUSTUBLINKER *psl); + static void EmitCheckRestore(CPUSTUBLINKER *psl); +#endif +}; +#endif // _TARGET_X86_ + extern "C" LONG g_global_alloc_lock; extern "C" void STDCALL JIT_WriteBarrierReg_PreGrow();// JIThelp.asm/JIThelp.s diff --git a/src/coreclr/src/vm/jitinterface.h b/src/coreclr/src/vm/jitinterface.h index 125a847..e34b859 100644 --- a/src/coreclr/src/vm/jitinterface.h +++ b/src/coreclr/src/vm/jitinterface.h @@ -1546,41 +1546,6 @@ EXTERN_C void JIT_TailCallHelperStub_ReturnAddress(); #endif // _TARGET_AMD64_ || _TARGET_ARM_ - -#ifdef _TARGET_X86_ - -class JIT_TrialAlloc -{ -public: - enum Flags - { - NORMAL = 0x0, - MP_ALLOCATOR = 0x1, - SIZE_IN_EAX = 0x2, - OBJ_ARRAY = 0x4, - ALIGN8 = 0x8, // insert a dummy object to insure 8 byte alignment (until the next GC) - ALIGN8OBJ = 0x10, - NO_FRAME = 0x20, // call is from unmanaged code - don't try to put up a frame - }; - - static void *GenAllocSFast(Flags flags); - static void *GenBox(Flags flags); - static void *GenAllocArray(Flags flags); - static void *GenAllocString(Flags flags); - -private: - static void EmitAlignmentRoundup(CPUSTUBLINKER *psl,X86Reg regTestAlign, X86Reg regToAdj, Flags flags); - static void EmitDummyObject(CPUSTUBLINKER *psl, X86Reg regTestAlign, Flags flags); - static void EmitCore(CPUSTUBLINKER *psl, CodeLabel *noLock, CodeLabel *noAlloc, Flags flags); - static void EmitNoAllocCode(CPUSTUBLINKER *psl, Flags flags); - -#if CHECK_APP_DOMAIN_LEAKS - static void EmitSetAppDomain(CPUSTUBLINKER *psl); - static void EmitCheckRestore(CPUSTUBLINKER *psl); -#endif -}; -#endif // _TARGET_X86_ - void *GenFastGetSharedStaticBase(bool bCheckCCtor); #ifdef HAVE_GCCOVER -- 2.7.4