Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/debug/daccess/dacdbiimplstackwalk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

//---------------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/debug/daccess/fntableaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions src/debug/ee/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/debug/ee/debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 1 addition & 4 deletions src/debug/ee/frameinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

Expand Down
8 changes: 2 additions & 6 deletions src/inc/clrnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/inc/corcompile.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cor.h>
#include <corhdr.h>
Expand Down
2 changes: 1 addition & 1 deletion src/inc/dbggcinfodecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ typedef void (*GCEnumCallback)(
);


#if defined(_WIN64) || defined(_TARGET_ARM_)
#if !defined(_TARGET_X86_)
#define USE_GC_INFO_DECODER
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/inc/eetwain.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/inc/gcinfodecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 5 additions & 9 deletions src/inc/jithelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/inc/mdilhelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 3 additions & 11 deletions src/inc/regdisp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}


Expand Down
4 changes: 2 additions & 2 deletions src/inc/switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -168,7 +168,7 @@
#define PROF_TEST_ONLY_FORCE_OBJECT_ALLOCATED
#endif // PROFILING_SUPPORTED

#endif // defined(_DEBUG) && (defined(_TARGET_X86_) || defined(_WIN64))
#endif // _DEBUG



Expand Down
2 changes: 1 addition & 1 deletion src/vm/codeman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
2 changes: 0 additions & 2 deletions src/vm/eedbginterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/vm/exceptionhandling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,19 +189,19 @@ 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,
// then pinvoke will be performed via an ILStub and thus, stackalloc will be performed in a frame different
// 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
Expand Down
2 changes: 1 addition & 1 deletion src/vm/frames.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/vm/gcenv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
58 changes: 0 additions & 58 deletions src/vm/proftoeeinterfaceimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading