diff options
-rw-r--r-- | src/ToolBox/SOS/Strike/disasm.cpp | 6 | ||||
-rw-r--r-- | src/inc/gcdump.h | 4 | ||||
-rw-r--r-- | src/inc/gcinfodecoder.h | 7 | ||||
-rw-r--r-- | src/vm/gcinfodecoder.cpp | 11 |
4 files changed, 16 insertions, 12 deletions
diff --git a/src/ToolBox/SOS/Strike/disasm.cpp b/src/ToolBox/SOS/Strike/disasm.cpp index 701c6bec22..c614fbb23b 100644 --- a/src/ToolBox/SOS/Strike/disasm.cpp +++ b/src/ToolBox/SOS/Strike/disasm.cpp @@ -44,7 +44,6 @@ namespace X86GCDump #endif // SOS_TARGET_X86 #ifdef SOS_TARGET_AMD64 -#ifndef FEATURE_PAL #include "gcdump.h" #define DAC_ARG(x) #define SUPPORTS_DAC @@ -60,7 +59,6 @@ namespace X86GCDump #endif #define LOG_PIPTR(pObjRef, gcFlags, hCallBack) ((void)0) #include "gcdumpnonx86.cpp" -#endif // FEATURE_PAL #endif // SOS_TARGET_AMD64 #include "disasm.h" @@ -1111,9 +1109,6 @@ LPCSTR AMD64Machine::s_SPName = "RSP"; /// void AMD64Machine::DumpGCInfo(BYTE* pTable, unsigned methodSize, printfFtn gcPrintf, bool encBytes, bool bPrintHeader) const { -#ifdef FEATURE_PAL - ExtErr("AMD64Machine::DumpGCInfo not implemented\n"); -#else if (bPrintHeader) { ExtOut("Pointer table:\n"); @@ -1123,7 +1118,6 @@ void AMD64Machine::DumpGCInfo(BYTE* pTable, unsigned methodSize, printfFtn gcPri gcDump.gcPrintf = gcPrintf; gcDump.DumpGCTable(pTable, methodSize, 0); -#endif // FEATURE_PAL } #endif // SOS_TARGET_AMD64 diff --git a/src/inc/gcdump.h b/src/inc/gcdump.h index 7aec159997..aded6bb102 100644 --- a/src/inc/gcdump.h +++ b/src/inc/gcdump.h @@ -20,7 +20,11 @@ #include "gcinfo.h" // For InfoHdr #ifndef FASTCALL +#ifndef FEATURE_PAL #define FASTCALL __fastcall +#else +#define FASTCALL +#endif #endif diff --git a/src/inc/gcinfodecoder.h b/src/inc/gcinfodecoder.h index bd802fe6b3..52e8ed8b62 100644 --- a/src/inc/gcinfodecoder.h +++ b/src/inc/gcinfodecoder.h @@ -13,6 +13,9 @@ #include "daccess.h" +#define _max(a, b) (((a) > (b)) ? (a) : (b)) +#define _min(a, b) (((a) < (b)) ? (a) : (b)) + #ifndef GCINFODECODER_NO_EE #include "eetwain.h" @@ -150,6 +153,10 @@ enum ICodeManagerFlags #define MAX_PREDECODED_SLOTS 64 #endif +#if defined(FEATURE_PAL) && !defined(STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY) +#define STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY +#endif + enum GcInfoDecoderFlags diff --git a/src/vm/gcinfodecoder.cpp b/src/vm/gcinfodecoder.cpp index 068d234a0c..6ec4596ac9 100644 --- a/src/vm/gcinfodecoder.cpp +++ b/src/vm/gcinfodecoder.cpp @@ -1175,7 +1175,7 @@ void GcSlotDecoder::DecodeSlotTable(BitStreamReader& reader) m_SlotArray[0].Slot.RegisterNumber = regNum; m_SlotArray[0].Flags = flags; - UINT32 loopEnd = min(m_NumRegisters, MAX_PREDECODED_SLOTS); + UINT32 loopEnd = _min(m_NumRegisters, MAX_PREDECODED_SLOTS); for(i++; i < loopEnd; i++) { if(flags) @@ -1209,7 +1209,7 @@ void GcSlotDecoder::DecodeSlotTable(BitStreamReader& reader) m_SlotArray[i].Slot.Stack.Base = spBase; m_SlotArray[i].Flags = flags; - UINT32 loopEnd = min(m_NumRegisters + numStackSlots, MAX_PREDECODED_SLOTS); + UINT32 loopEnd = _min(m_NumRegisters + numStackSlots, MAX_PREDECODED_SLOTS); for(i++; i < loopEnd; i++) { spBase = (GcStackSlotBase) reader.Read(2); @@ -1246,7 +1246,7 @@ void GcSlotDecoder::DecodeSlotTable(BitStreamReader& reader) m_SlotArray[i].Slot.Stack.Base = spBase; m_SlotArray[i].Flags = flags; - UINT32 loopEnd = min(m_NumSlots, MAX_PREDECODED_SLOTS); + UINT32 loopEnd = _min(m_NumSlots, MAX_PREDECODED_SLOTS); for(i++; i < loopEnd; i++) { spBase = (GcStackSlotBase) reader.Read(2); @@ -1545,8 +1545,7 @@ void GcInfoDecoder::ReportRegisterToGC( // AMD64 LOG((LF_GCROOTS, LL_INFO1000, "Reporting " FMT_REG, regNum )); OBJECTREF* pObjRef = GetRegisterSlot( regNum, pRD ); - -#ifdef FEATURE_PAL +#if defined(FEATURE_PAL) && !defined(SOS_TARGET_AMD64) // On PAL, we don't always have the context pointers available due to // a limitation of an unwinding library. In such case, the context // pointers for some nonvolatile registers are NULL. @@ -1566,7 +1565,7 @@ void GcInfoDecoder::ReportRegisterToGC( // AMD64 gcFlags |= GC_CALL_PINNED; } -#endif // FEATURE_PAL +#endif // FEATURE_PAL && !SOS_TARGET_AMD64 #ifdef _DEBUG if(IsScratchRegister(regNum, pRD)) |