diff --git a/src/debug/daccess/dacdbiimplstackwalk.cpp b/src/debug/daccess/dacdbiimplstackwalk.cpp index 1fd3202842c3..8c59ef7fffa4 100644 --- a/src/debug/daccess/dacdbiimplstackwalk.cpp +++ b/src/debug/daccess/dacdbiimplstackwalk.cpp @@ -1175,15 +1175,9 @@ void DacDbiInterfaceImpl::UpdateContextFromRegDisp(REGDISPLAY * pRegDisp, { *pContext = *pRegDisp->pContext; } - -#elif defined(_WIN64) || defined(_TARGET_ARM_) +#else *pContext = *pRegDisp->pCurrentContext; - -#else // !_TARGET_X86_ && !_WIN64 - _ASSERTE(!"DDII::UpdateContextFromRegDisplay() - NYI on this platform\n"); - ThrowHR(E_NOTIMPL); - -#endif // !_TARGET_X86_ && !_WIN64 +#endif } //--------------------------------------------------------------------------------------- diff --git a/src/debug/daccess/fntableaccess.h b/src/debug/daccess/fntableaccess.h index 674aed8fac44..16954d0b4e5d 100644 --- a/src/debug/daccess/fntableaccess.h +++ b/src/debug/daccess/fntableaccess.h @@ -143,10 +143,10 @@ class CheckDuplicatedStructLayouts CHECK_OFFSET(HeapList, mapBase); CHECK_OFFSET(HeapList, pHdrMap); -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) CHECK_OFFSET(RealCodeHeader, nUnwindInfos); CHECK_OFFSET(RealCodeHeader, unwindInfos); -#endif // _WIN64 || _TARGET_ARM_ +#endif // !_TARGET_X86_ #ifdef DEBUGSUPPORT_STUBS_HAVE_UNWIND_INFO CHECK_OFFSET(StubUnwindInfoHeader, pNext); diff --git a/src/debug/ee/debugger.cpp b/src/debug/ee/debugger.cpp index 7ccf26f9e84c..358246aac341 100644 --- a/src/debug/ee/debugger.cpp +++ b/src/debug/ee/debugger.cpp @@ -3956,12 +3956,10 @@ HRESULT Debugger::SetIP( bool fCanSetIPOnly, Thread *thread,Module *module, DeleteInteropSafe(rgVal2); } -#if defined(_TARGET_X86_) || defined(_WIN64) || defined(_TARGET_ARM_) if (pEHRT != NULL) { delete pEHRT; } -#endif // _TARGET_X86_ || _WIN64 LOG((LF_CORDB, LL_INFO1000, "D::SIP:Returning 0x%x\n", hr)); return hrAdvise; diff --git a/src/debug/ee/debugger.h b/src/debug/ee/debugger.h index 29585de31d1b..41ff93d16f46 100644 --- a/src/debug/ee/debugger.h +++ b/src/debug/ee/debugger.h @@ -3825,7 +3825,7 @@ class IPCHostSecurityAttributeHolder // Returns true if the specified IL offset has a special meaning (eg. prolog, etc.) bool DbgIsSpecialILOffset(DWORD offset); -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) void FixupDispatcherContext(T_DISPATCHER_CONTEXT* pDispatcherContext, T_CONTEXT* pContext, T_CONTEXT* pOriginalContext, PEXCEPTION_ROUTINE pUnwindPersonalityRoutine = NULL); #endif diff --git a/src/debug/ee/frameinfo.cpp b/src/debug/ee/frameinfo.cpp index 810682d1380f..d4dc6838e49f 100644 --- a/src/debug/ee/frameinfo.cpp +++ b/src/debug/ee/frameinfo.cpp @@ -2128,7 +2128,7 @@ StackWalkAction DebuggerWalkStack(Thread *thread, data.regDisplay.ControlPC = context->Eip; data.regDisplay.PCTAddr = (TADDR)&(context->Eip); -#elif defined(_WIN64) || defined(_TARGET_ARM_) +#else // // @TODO: this should be the code for all platforms now that it uses FillRegDisplay, // which encapsulates the platform variances. This could all be avoided if we used @@ -2139,9 +2139,6 @@ StackWalkAction DebuggerWalkStack(Thread *thread, FillRegDisplay(&data.regDisplay, context); ::SetSP(data.regDisplay.pCallerContext, 0); -#else - PORTABILITY_ASSERT("DebuggerWalkStack needs extended register information on this platform."); - #endif } diff --git a/src/inc/clrnt.h b/src/inc/clrnt.h index e477b524dc66..ed52e04a5351 100644 --- a/src/inc/clrnt.h +++ b/src/inc/clrnt.h @@ -752,11 +752,7 @@ typedef VM_COUNTERS *PVM_COUNTERS; #endif // !defined(FEATURE_PAL) -// -// WIN64 -// - -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) typedef enum _FUNCTION_TABLE_TYPE { RF_SORTED, @@ -786,7 +782,7 @@ typedef struct _DYNAMIC_FUNCTION_TABLE { ULONG EntryCount; } DYNAMIC_FUNCTION_TABLE, *PDYNAMIC_FUNCTION_TABLE; -#endif // defined(_WIN64) || defined(_TARGET_ARM_) +#endif // !_TARGET_X86_ // // AMD64 diff --git a/src/inc/corcompile.h b/src/inc/corcompile.h index 2e59a5882334..693cf31edf7e 100644 --- a/src/inc/corcompile.h +++ b/src/inc/corcompile.h @@ -23,11 +23,11 @@ #error FEATURE_PREJIT is required for this file #endif // FEATURE_PREJIT -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) #ifndef WIN64EXCEPTIONS #define WIN64EXCEPTIONS #endif -#endif // _WIN64 || _TARGET_ARM_ +#endif // !_TARGET_X86_ #include #include diff --git a/src/inc/dbggcinfodecoder.h b/src/inc/dbggcinfodecoder.h index f618ca336f33..b87f9e6a9f23 100644 --- a/src/inc/dbggcinfodecoder.h +++ b/src/inc/dbggcinfodecoder.h @@ -62,7 +62,7 @@ typedef void (*GCEnumCallback)( ); -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) #define USE_GC_INFO_DECODER #endif diff --git a/src/inc/eetwain.h b/src/inc/eetwain.h index 1eab126734ad..b88af6fba207 100644 --- a/src/inc/eetwain.h +++ b/src/inc/eetwain.h @@ -32,7 +32,7 @@ #include "stackwalktypes.h" #include "bitvector.h" -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) #define USE_GC_INFO_DECODER #endif diff --git a/src/inc/gcinfodecoder.h b/src/inc/gcinfodecoder.h index 122b3396bba6..628bb355c39f 100644 --- a/src/inc/gcinfodecoder.h +++ b/src/inc/gcinfodecoder.h @@ -133,7 +133,7 @@ enum ICodeManagerFlags #endif // !_strike_h -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) #define USE_GC_INFO_DECODER #endif diff --git a/src/inc/jithelpers.h b/src/inc/jithelpers.h index 92e2bafdc1cd..686004499cfd 100644 --- a/src/inc/jithelpers.h +++ b/src/inc/jithelpers.h @@ -229,7 +229,7 @@ JITHELPER1(CORINFO_HELP_GETGENERICS_GCSTATIC_BASE, JIT_GetGenericsGCStaticBase,CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_UNDEF) JITHELPER1(CORINFO_HELP_GETGENERICS_NONGCSTATIC_BASE, JIT_GetGenericsNonGCStaticBase,CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_UNDEF) -#if defined(_TARGET_X86_) +#ifdef _TARGET_X86_ DYNAMICJITHELPER1(CORINFO_HELP_GETSHARED_GCSTATIC_BASE, NULL, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_UNDEF) DYNAMICJITHELPER1(CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE, NULL, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_UNDEF) DYNAMICJITHELPER1(CORINFO_HELP_GETSHARED_GCSTATIC_BASE_NOCTOR, NULL, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_UNDEF) @@ -278,16 +278,12 @@ DYNAMICJITHELPER1(CORINFO_HELP_INIT_PINVOKE_FRAME, NULL, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_INIT_PINVOKE_FRAME) #endif -#if defined(_WIN64) || defined(_TARGET_ARM_) - - JITHELPER1(CORINFO_HELP_MEMSET, JIT_MemSet, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_MEMSET) - JITHELPER1(CORINFO_HELP_MEMCPY, JIT_MemCpy, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_MEMCPY) - -#else // _WIN64 || _TARGET_ARM_ - +#ifdef _TARGET_X86_ JITHELPER1(CORINFO_HELP_MEMSET, NULL, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB, MDIL_HELP_MEMSET) JITHELPER1(CORINFO_HELP_MEMCPY, NULL, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB, MDIL_HELP_MEMCPY) - +#else + JITHELPER1(CORINFO_HELP_MEMSET, JIT_MemSet, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_MEMSET) + JITHELPER1(CORINFO_HELP_MEMCPY, JIT_MemCpy, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_MEMCPY) #endif // Generics diff --git a/src/inc/mdilhelpers.h b/src/inc/mdilhelpers.h index 4318926e7d1a..a6c5cfc1edb6 100644 --- a/src/inc/mdilhelpers.h +++ b/src/inc/mdilhelpers.h @@ -176,12 +176,12 @@ MDILHELPER(MDIL_HELP_CHECK_PINVOKE_DOMAIN, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB) #endif -#if defined(_WIN64) || defined(_TARGET_ARM_) - MDILHELPER(MDIL_HELP_MEMSET, CORINFO_HELP_SIG_REG_ONLY) - MDILHELPER(MDIL_HELP_MEMCPY, CORINFO_HELP_SIG_REG_ONLY) -#else +#ifdef _TARGET_X86_ MDILHELPER(MDIL_HELP_MEMSET, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB) MDILHELPER(MDIL_HELP_MEMCPY, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB) +#else + MDILHELPER(MDIL_HELP_MEMSET, CORINFO_HELP_SIG_REG_ONLY) + MDILHELPER(MDIL_HELP_MEMCPY, CORINFO_HELP_SIG_REG_ONLY) #endif MDILHELPER(MDIL_HELP_RUNTIMEHANDLE_METHOD, CORINFO_HELP_SIG_REG_ONLY) diff --git a/src/inc/regdisp.h b/src/inc/regdisp.h index 9da1abed973b..601137ddf92f 100644 --- a/src/inc/regdisp.h +++ b/src/inc/regdisp.h @@ -489,14 +489,12 @@ inline void CopyRegDisplay(const PREGDISPLAY pInRD, PREGDISPLAY pOutRD, T_CONTEX if (pInRD->pEdx != NULL) {pOutCtx->Edx = *pInRD->pEdx;} else {pInRD->pEdx = NULL;} pOutCtx->Esp = pInRD->Esp; pOutCtx->Eip = pInRD->ControlPC; -#elif defined(_WIN64) || defined(_TARGET_ARM_) +#else *pOutCtx = *(pInRD->pCurrentContext); if (pInRD->IsCallerContextValid) { pOutCallerCtx = pInRD->pCallerContext; } -#else - PORTABILITY_ASSERT("@NYI Platform - CopyRegDisplay (Threads.cpp)"); #endif if (pOutRD) @@ -575,15 +573,9 @@ inline void UpdateContextFromRegDisp(PREGDISPLAY pRegDisp, PT_CONTEXT pContext) pContext->Edx = *pRegDisp->pEdx; pContext->Esp = pRegDisp->Esp; pContext->Eip = pRegDisp->ControlPC; - -#elif defined(_WIN64) || defined(_TARGET_ARM_) +#else *pContext = *pRegDisp->pCurrentContext; - -#else // !_TARGET_X86_ && !_WIN64 && !_TARGET_ARM_ - _ASSERTE(!"DDII::UpdateContextFromRegDisplay() - NYI on this platform\n"); - ThrowHR(E_NOTIMPL); - -#endif // !_TARGET_X86_ && !_WIN64 && !_TARGET_ARM_ +#endif } diff --git a/src/inc/switches.h b/src/inc/switches.h index 12cd6278c00e..b298b5563b94 100644 --- a/src/inc/switches.h +++ b/src/inc/switches.h @@ -149,7 +149,7 @@ #endif -#if defined(_DEBUG) && (defined(_TARGET_X86_) || defined(_WIN64) || defined(_TARGET_ARM_)) +#ifdef _DEBUG //hurray DAC makes everything more fun - you can't have defines that control whether //or not data members are visible which differ between DAC and non-DAC builds. @@ -168,7 +168,7 @@ #define PROF_TEST_ONLY_FORCE_OBJECT_ALLOCATED #endif // PROFILING_SUPPORTED -#endif // defined(_DEBUG) && (defined(_TARGET_X86_) || defined(_WIN64)) +#endif // _DEBUG diff --git a/src/vm/codeman.cpp b/src/vm/codeman.cpp index d68e45b0af9e..fed3f09ccf94 100644 --- a/src/vm/codeman.cpp +++ b/src/vm/codeman.cpp @@ -2186,7 +2186,7 @@ CodeHeader* EEJitManager::allocCode(MethodDesc* pMD, size_t blockSize, CorJitAll alignment = max(alignment, 16); } -#if !defined(_WIN64) && !defined(_TARGET_ARM_) +#if defined(_TARGET_X86_) // when not optimizing for code size, 8-byte align the method entry point, so that // the JIT can in turn 8-byte align the loop entry headers. // diff --git a/src/vm/eedbginterface.h b/src/vm/eedbginterface.h index a39b7db6fc27..f300a0f665aa 100644 --- a/src/vm/eedbginterface.h +++ b/src/vm/eedbginterface.h @@ -328,7 +328,6 @@ class EEDebugInterface virtual void DebuggerModifyingLogSwitch (int iNewLevel, const WCHAR *pLogSwitchName) = 0; -#if defined(_TARGET_X86_) || defined(_WIN64) || defined(_TARGET_ARM_) virtual HRESULT SetIPFromSrcToDst(Thread *pThread, SLOT addrStart, DWORD offFrom, @@ -338,7 +337,6 @@ class EEDebugInterface PT_CONTEXT pCtx, void *pDji, EHRangeTree *pEHRT) = 0; -#endif // _TARGET_X86_ || _WIN64 || _TARGET_ARM_ virtual void SetDebugState(Thread *pThread, CorDebugThreadState state) = 0; diff --git a/src/vm/exceptionhandling.cpp b/src/vm/exceptionhandling.cpp index 1666f5e60379..2c9d3298d6fc 100644 --- a/src/vm/exceptionhandling.cpp +++ b/src/vm/exceptionhandling.cpp @@ -189,7 +189,7 @@ StackWalkAction UpdateObjectRefInResumeContextCallback(CrawlFrame* pCF, LPVOID p // // It is possible that a managed frame may execute a PInvoke after performing a stackalloc: // - // 1) The Evanesco JIT will always inline the PInvoke in the managed frame, whether or not the frame + // 1) The ARM JIT will always inline the PInvoke in the managed frame, whether or not the frame // contains EH. As a result, the ICF will live in the same frame which performs stackalloc. // // 2) JIT64 will only inline the PInvoke in the managed frame if the frame *does not* contain EH. If it does, @@ -197,11 +197,11 @@ StackWalkAction UpdateObjectRefInResumeContextCallback(CrawlFrame* pCF, LPVOID p // from the one (ILStub) that contains the ICF. // // Thus, for the scenario where the catch handler lives in the frame that performed stackalloc, in case of - // Evanesco JIT, the SP returned by the OS will be the SP *after* the stackalloc has happened. However, + // ARM JIT, the SP returned by the OS will be the SP *after* the stackalloc has happened. However, // the stackwalker will invoke this callback with the CrawlFrameSP that was initialized at the time ICF was setup, i.e., // it will be the SP after the prolog has executed (refer to InlinedCallFrame::UpdateRegDisplay). // - // Thus, checking only the SP will not work for this scenario when using the Evanesco JIT. + // Thus, checking only the SP will not work for this scenario when using the ARM JIT. // // To address this case, the callback data also contains the frame pointer (FP) passed by the OS. This will // be the value that is saved in the "CalleeSavedFP" field of the InlinedCallFrame during ICF diff --git a/src/vm/frames.h b/src/vm/frames.h index 885c65c84e7b..05a7a175f630 100644 --- a/src/vm/frames.h +++ b/src/vm/frames.h @@ -251,7 +251,7 @@ FRAME_TYPE_NAME(ExternalMethodFrame) #ifdef FEATURE_READYTORUN FRAME_TYPE_NAME(DynamicHelperFrame) #endif -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) FRAME_TYPE_NAME(StubHelperFrame) #endif FRAME_TYPE_NAME(GCFrame) diff --git a/src/vm/gcenv.cpp b/src/vm/gcenv.cpp index ceba57cb592d..a342533f98f4 100644 --- a/src/vm/gcenv.cpp +++ b/src/vm/gcenv.cpp @@ -180,7 +180,7 @@ StackWalkAction GcStackCrawlCallBack(CrawlFrame* pCF, VOID* pData) bool fReportGCReferences = true; #if defined(WIN64EXCEPTIONS) - // On Win64 and ARM, we may have unwound this crawlFrame and thus, shouldn't report the invalid + // We may have unwound this crawlFrame and thus, shouldn't report the invalid // references it may contain. fReportGCReferences = pCF->ShouldCrawlframeReportGCReferences(); #endif // defined(WIN64EXCEPTIONS) diff --git a/src/vm/proftoeeinterfaceimpl.cpp b/src/vm/proftoeeinterfaceimpl.cpp index 9d2469f23691..088c231a1136 100644 --- a/src/vm/proftoeeinterfaceimpl.cpp +++ b/src/vm/proftoeeinterfaceimpl.cpp @@ -9379,64 +9379,6 @@ FCIMPL2(void, ProfilingFCallHelper::FC_RemotingServerSendingReply, GUID *pId, CL } FCIMPLEND -// -// Define wrapper functions for rotor. -// -// NOTE: These do not currently implement correctly passing the platform -// specific handle. The Rotor people need to implement these correctly if -// they care to support getting arguments, return value, and generic information. -// -#if !defined(_TARGET_X86_) && !defined(_WIN64) && !defined(_TARGET_ARM_) && defined(PROFILING_SUPPORTED) - -FCIMPL1(EXTERN_C void, ProfileEnterWrapper, FunctionIDOrClientID functionIDOrClientID) -{ - FCALL_CONTRACT; - - // - // Create some empty buffer space for the platformSpecificHandle - // - BYTE buffer[60] = {0}; - - PORTABILITY_ASSERT("ProfileEnterWrapper not implemented"); - REMOVE_STACK_GUARD_FOR_PROFILER_CALL; - ProfileEnter(functionIDOrClientID.clientID, &buffer); -} -FCIMPLEND - -FCIMPL1(EXTERN_C void, ProfileLeaveWrapper, FunctionIDOrClientID functionIDOrClientID) -{ - FCALL_CONTRACT; - - // - // Create some empty buffer space for the platformSpecificHandle - // - BYTE buffer[60] = {0}; - - PORTABILITY_ASSERT("ProfileLeaveWrapper not implemented"); - - REMOVE_STACK_GUARD_FOR_PROFILER_CALL; - ProfileLeave(functionIDOrClientID.clientID, &buffer); -} -FCIMPLEND - -FCIMPL1(EXTERN_C void, ProfileTailcallWrapper, FunctionIDOrClientID functionIDOrClientID) -{ - FCALL_CONTRACT; - - // - // Create some empty buffer space for the platformSpecificHandle - // - BYTE buffer[60] = {0}; - - PORTABILITY_ASSERT("ProfileTailcallWrapper not implemented"); - - REMOVE_STACK_GUARD_FOR_PROFILER_CALL; - ProfileTailcall(functionIDOrClientID.clientID, &buffer); -} -FCIMPLEND - -#endif - //******************************************************************************************* // These do a lot of work for us, setting up Frames, gathering arg info and resolving generics. diff --git a/src/vm/stackwalk.cpp b/src/vm/stackwalk.cpp index eb12aea75057..2fc8f047c9b2 100644 --- a/src/vm/stackwalk.cpp +++ b/src/vm/stackwalk.cpp @@ -1136,9 +1136,9 @@ void StackFrameIterator::CommonCtor(Thread * pThread, PTR_Frame pFrame, ULONG32 m_fDidFuncletReportGCReferences = true; #endif // WIN64EXCEPTIONS -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) m_pvResumableFrameTargetSP = NULL; -#endif // defined(_WIN64) || defined(_TARGET_ARM_) +#endif } // StackFrameIterator::CommonCtor() //--------------------------------------------------------------------------------------- @@ -1183,10 +1183,10 @@ BOOL StackFrameIterator::Init(Thread * pThread, _ASSERTE(CanThisThreadCallIntoHost() || (flags & LIGHTUNWIND) == 0); #endif // DACCESS_COMPILE -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) _ASSERTE(!(flags & POPFRAMES)); _ASSERTE(pRegDisp->pCurrentContext); -#endif // _WIN64 || _TARGET_ARM_ +#endif // !_TARGET_X86_ BEGIN_FORBID_TYPELOAD(); @@ -1342,7 +1342,7 @@ BOOL StackFrameIterator::ResetRegDisp(PREGDISPLAY pRegDisp, { TADDR curSP = GetRegdisplaySP(m_crawl.pRD); -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) if (m_crawl.IsFrameless()) { // On 64-bit and ARM, we stop at the explicit frames contained in a managed stack frame @@ -1350,7 +1350,7 @@ BOOL StackFrameIterator::ResetRegDisp(PREGDISPLAY pRegDisp, EECodeManager::EnsureCallerContextIsValid(m_crawl.pRD, NULL); curSP = GetSP(m_crawl.pRD->pCallerContext); } -#endif // defined(_WIN64) || defined(_TARGET_ARM_) +#endif // !_TARGET_X86_ #if defined(_TARGET_X86_) // special processing on x86; see below for more information @@ -1673,15 +1673,15 @@ StackWalkAction StackFrameIterator::Filter(void) // When enumerating GC references for "liveness" reporting, depending upon the architecture, // the reponsibility of who reports what varies: // - // 1) On x86, Evanesco (ARM) and X64 (via RyuJIT) the funclet reports all references belonging to itself and its parent method. + // 1) On x86, ARM and X64 (via RyuJIT) the funclet reports all references belonging to itself and its parent method. // // 2) X64 (via JIT64) has the reporting distributed between the funclets and the parent method. // If some reference(s) get double reported, JIT64 can handle that by playing conservative. // - // 3) On Evanesco, the reporting is done by funclets (if present). Otherwise, the primary method + // 3) On ARM, the reporting is done by funclets (if present). Otherwise, the primary method // does it. // - // On x64 and Evanesco, the GCStackCrawlCallback is invoked with a new flag indicating that + // On x64 and ARM, the GCStackCrawlCallback is invoked with a new flag indicating that // the stackwalk is being done for GC reporting purposes - this flag is GC_FUNCLET_REFERENCE_REPORTING. // The presence of this flag influences how stackwalker will enumerate frames, which frames will // result in the callback being invoked, etc. The idea is that we want to report only the @@ -1689,7 +1689,7 @@ StackWalkAction StackFrameIterator::Filter(void) // double report (even though JIT64 does it today), reporting of dead frames, and makes the // design of reference reporting more consistent (and easier to understand) across architectures. // - // NOTE: This flag is applicable only to X64 and Evanesco (ARM). + // NOTE: This flag is applicable only to X64 and ARM. // // The algorithm is as follows (at a conceptual level): // @@ -1708,7 +1708,7 @@ StackWalkAction StackFrameIterator::Filter(void) // 2) If another frame enumerated, goto (1). Otherwise, stackwalk is complete. // // Note: When a flag is passed to the callback indicating that the funclet for a parent frame has already - // reported the references, RyuJIT (Evanesco) will simply do nothing and return from the callback. + // reported the references, RyuJIT (ARM) will simply do nothing and return from the callback. // JIT64, on the other hand, will ignore the flag and perform reporting (again), like it does today. // // Note: For non-filter funcelts there is a small window during unwind where we have conceptually unwound past a @@ -2217,7 +2217,7 @@ StackWalkAction StackFrameIterator::NextRaw(void) if (m_frameState == SFITER_SKIPPED_FRAME_FUNCTION) { -#if (defined(_WIN64) || defined(_TARGET_ARM_)) && defined(_DEBUG) +#if !defined(_TARGET_X86_) && defined(_DEBUG) // make sure we're not skipping a different transition if (m_crawl.pFrame->NeedsUpdateRegDisplay()) { @@ -2235,7 +2235,7 @@ StackWalkAction StackFrameIterator::NextRaw(void) CONSISTENCY_CHECK(GetControlPC(m_crawl.pRD) == m_crawl.pFrame->GetReturnAddress()); } } -#endif // (defined(_WIN64) || defined(_TARGET_ARM_)) && defined(_DEBUG) +#endif // !defined(_TARGET_X86_) && defined(_DEBUG) #if defined(STACKWALKER_MAY_POP_FRAMES) if (m_flags & POPFRAMES) @@ -2290,8 +2290,8 @@ StackWalkAction StackFrameIterator::NextRaw(void) { goto Cleanup; } -#elif (defined(_WIN64) || defined(_TARGET_ARM_)) - // On WIN64 and ARM, we are done handling the skipped explicit frame at this point. So move on to the +#else // _TARGET_X86_ + // We are done handling the skipped explicit frame at this point. So move on to the // managed stack frame. m_crawl.isFrameless = true; m_crawl.codeInfo = m_cachedCodeInfo; @@ -2300,16 +2300,16 @@ StackWalkAction StackFrameIterator::NextRaw(void) PreProcessingForManagedFrames(); goto Cleanup; -#endif // (defined(_WIN64) || defined(_TARGET_ARM_)) +#endif // _TARGET_X86_ } } else if (m_frameState == SFITER_FRAMELESS_METHOD) { // Now find out if we need to leave monitors -#if !defined(_WIN64) && !defined(_TARGET_ARM_) +#ifdef _TARGET_X86_ // - // WIN64 and ARM has the JIT generate try/finallys to leave monitors + // For non-x86 platforms, the JIT generates try/finally to leave monitors; for x86, the VM handles the monitor // #if defined(STACKWALKER_MAY_POP_FRAMES) if (m_flags & POPFRAMES) @@ -2354,7 +2354,7 @@ StackWalkAction StackFrameIterator::NextRaw(void) END_GCX_ASSERT_COOP; } #endif // STACKWALKER_MAY_POP_FRAMES -#endif // !defined(_WIN64) && !defined(_TARGET_ARM_) +#endif // _TARGET_X86_ #if !defined(ELIMINATE_FEF) // FaultingExceptionFrame is special case where it gets @@ -2542,7 +2542,7 @@ StackWalkAction StackFrameIterator::NextRaw(void) { m_crawl.pFrame->UpdateRegDisplay(m_crawl.pRD); -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) CONSISTENCY_CHECK(NULL == m_pvResumableFrameTargetSP); if (m_crawl.isFirst) @@ -2570,7 +2570,7 @@ StackWalkAction StackFrameIterator::NextRaw(void) EECodeManager::EnsureCallerContextIsValid(m_crawl.pRD, m_crawl.GetStackwalkCacheEntry()); m_pvResumableFrameTargetSP = (LPVOID)GetSP(m_crawl.pRD->pCallerContext); } -#endif // defined(_WIN64) || defined(_TARGET_ARM_) +#endif // !_TARGET_X86_ // We are transitioning from unmanaged code to managed code... lets do some validation of our @@ -2870,15 +2870,15 @@ void StackFrameIterator::ProcessCurrentFrame(void) // Cache values which may be updated by CheckForSkippedFrames() m_cachedCodeInfo = m_crawl.codeInfo; -#if defined(_WIN64) || defined(_TARGET_ARM_) - // On WIN64 and ARM, we want to process the skipped explicit frames before the managed stack frame +#if !defined(_TARGET_X86_) + // On non-X86, we want to process the skipped explicit frames before the managed stack frame // containing them. if (CheckForSkippedFrames()) { _ASSERTE(m_frameState == SFITER_SKIPPED_FRAME_FUNCTION); } else -#endif // _WIN64 || _TARGET_ARM_ +#endif // !_TARGET_X86_ { PreProcessingForManagedFrames(); _ASSERTE(m_frameState == SFITER_FRAMELESS_METHOD); @@ -2925,9 +2925,9 @@ BOOL StackFrameIterator::CheckForSkippedFrames(void) // Can the caller handle skipped frames; fHandleSkippedFrames = (m_flags & HANDLESKIPPEDFRAMES); -#if !(defined(_WIN64) || defined(_TARGET_ARM_)) +#if !defined(_TARGET_X86_) pvReferenceSP = GetRegdisplaySP(m_crawl.pRD); -#else // (defined(_WIN64) || defined(_TARGET_ARM_)) +#else // !_TARGET_X86_ // Order the Frames relative to the caller SP of the methods // this makes it so that any Frame that is in a managed call // frame will be reported before its containing method. @@ -2935,7 +2935,7 @@ BOOL StackFrameIterator::CheckForSkippedFrames(void) // This should always succeed! If it doesn't, it's a bug somewhere else! EECodeManager::EnsureCallerContextIsValid(m_crawl.pRD, m_crawl.GetStackwalkCacheEntry(), &m_cachedCodeInfo); pvReferenceSP = GetSP(m_crawl.pRD->pCallerContext); -#endif // !(defined(_WIN64) || defined(_TARGET_ARM_)) +#endif // !_TARGET_X86_ if ( !( (m_crawl.pFrame != FRAME_TOP) && (dac_cast(m_crawl.pFrame) < pvReferenceSP) ) @@ -3021,7 +3021,7 @@ void StackFrameIterator::PreProcessingForManagedFrames(void) WRAPPER_NO_CONTRACT; SUPPORTS_DAC; -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) if (m_pvResumableFrameTargetSP) { // We expect that if we saw a resumable frame, the next managed @@ -3035,7 +3035,7 @@ void StackFrameIterator::PreProcessingForManagedFrames(void) m_pvResumableFrameTargetSP = NULL; m_crawl.isFirst = true; } -#endif // defined(_WIN64) || defined(_TARGET_ARM_) +#endif // !_TARGET_X86_ #if !defined(DACCESS_COMPILE) m_pCachedGSCookie = (GSCookie*)m_crawl.GetCodeManager()->GetGSCookieAddr( diff --git a/src/vm/stackwalk.h b/src/vm/stackwalk.h index fb45082596e1..c1731b8c27e0 100644 --- a/src/vm/stackwalk.h +++ b/src/vm/stackwalk.h @@ -687,9 +687,9 @@ class StackFrameIterator bool m_fDidFuncletReportGCReferences; #endif // WIN64EXCEPTIONS -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) LPVOID m_pvResumableFrameTargetSP; -#endif // defined(_WIN64) || defined(_TARGET_ARM_) +#endif // !_TARGET_X86_ }; void SetUpRegdisplayForStackWalk(Thread * pThread, T_CONTEXT * pContext, REGDISPLAY * pRegdisplay); diff --git a/src/vm/threads.cpp b/src/vm/threads.cpp index 4c3c60bb6a91..0d21e1579a5a 100644 --- a/src/vm/threads.cpp +++ b/src/vm/threads.cpp @@ -8180,16 +8180,16 @@ void Thread::FillRegDisplay(const PREGDISPLAY pRD, PT_CONTEXT pctx) ::FillRegDisplay(pRD, pctx); -#if defined(DEBUG_REGDISPLAY) && (defined(_WIN64) || defined(_TARGET_ARM_)) +#if defined(DEBUG_REGDISPLAY) && !defined(_TARGET_X86_) CONSISTENCY_CHECK(!pRD->_pThread || pRD->_pThread == this); pRD->_pThread = this; CheckRegDisplaySP(pRD); -#endif // defined(DEBUG_REGDISPLAY) && (defined(_WIN64) || defined(_TARGET_ARM_)) +#endif // defined(DEBUG_REGDISPLAY) && !defined(_TARGET_X86_) } -#if defined(DEBUG_REGDISPLAY) && (defined(_WIN64) || defined(_TARGET_ARM_)) +#if defined(DEBUG_REGDISPLAY) && !defined(_TARGET_X86_) void CheckRegDisplaySP (REGDISPLAY *pRD) { @@ -8200,7 +8200,7 @@ void CheckRegDisplaySP (REGDISPLAY *pRD) } } -#endif // defined(DEBUG_REGDISPLAY) && (defined(_WIN64) || defined(_TARGET_ARM_)) +#endif // defined(DEBUG_REGDISPLAY) && !defined(_TARGET_X86_) // Trip Functions // ============== diff --git a/src/vm/threads.h b/src/vm/threads.h index 355051d84f2b..de4e7e791123 100644 --- a/src/vm/threads.h +++ b/src/vm/threads.h @@ -3544,7 +3544,7 @@ class Thread: public IUnknown #define NOTIFY_ON_INITIAL_NATIVE_CONTEXT 0x4000 // Indicates that we are enumerating GC references and should follow appropriate - // callback rules for parent methods vs funclets. Only supported on X64 and Evanesco. + // callback rules for parent methods vs funclets. Only supported on X64 and ARM. // // Refer to StackFrameIterator::Filter for detailed comments on this flag. #define GC_FUNCLET_REFERENCE_REPORTING 0x8000 diff --git a/src/zap/common.h b/src/zap/common.h index a4d91935bf35..6c1063bbd351 100644 --- a/src/zap/common.h +++ b/src/zap/common.h @@ -22,11 +22,11 @@ #include #include -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) #ifndef WIN64EXCEPTIONS #define WIN64EXCEPTIONS #endif -#endif // _WIN64 || _TARGET_ARM_ +#endif // !_TARGET_X86_ #include "utilcode.h" #include "corjit.h"