}; // struct DomainLocalModule
+#define OFFSETOF__DomainLocalModule__m_pDataBlob_ (6 * TARGET_POINTER_SIZE)
+#ifdef FEATURE_64BIT_ALIGNMENT
+#define OFFSETOF__DomainLocalModule__NormalDynamicEntry__m_pDataBlob (TARGET_POINTER_SIZE /* m_pGCStatics */ + TARGET_POINTER_SIZE /* m_padding */)
+#else
+#define OFFSETOF__DomainLocalModule__NormalDynamicEntry__m_pDataBlob TARGET_POINTER_SIZE /* m_pGCStatics */
+#endif
typedef DPTR(class DomainLocalBlock) PTR_DomainLocalBlock;
class DomainLocalBlock
// | Class Data (one byte per class) | pointer to gc statics | primitive type statics |
//
//
+#ifndef CROSSBITNESS_COMPILE
+ // The assertions must hold in every non-crossbitness scenario
+ _ASSERTE(OFFSETOF__DomainLocalModule__m_pDataBlob_ == DomainLocalModule::OffsetOfDataBlob());
+ _ASSERTE(OFFSETOF__ThreadLocalModule__m_pDataBlob == ThreadLocalModule::OffsetOfDataBlob());
+#endif
+
DWORD dwNonGCBytes[2] = {
DomainLocalModule::OffsetOfDataBlob() + sizeof(BYTE)*dwNumTypes,
ThreadLocalModule::OffsetOfDataBlob() + sizeof(BYTE)*dwNumTypes
return;
}
+#ifndef CROSSBITNESS_COMPILE
+ _ASSERTE(OFFSETOF__DomainLocalModule__NormalDynamicEntry__m_pDataBlob == DomainLocalModule::DynamicEntry::GetOffsetOfDataBlob());
+#endif
// Statics for instantiated types are allocated dynamically per-instantiation
if (bDynamic)
{
// Non GC statics are embedded in the Dynamic Entry.
- *pOutNonGCStaticOffset = DomainLocalModule::DynamicEntry::GetOffsetOfDataBlob();
+ *pOutNonGCStaticOffset = OFFSETOF__DomainLocalModule__NormalDynamicEntry__m_pDataBlob;
return;
}
*pOutStaticHandleOffset = m_pRegularStaticOffsets[index*2];
*pOutNonGCStaticOffset = m_pRegularStaticOffsets[index*2 + 1];
+#ifdef CROSSBITNESS_COMPILE
+ *pOutNonGCStaticOffset += OFFSETOF__DomainLocalModule__m_pDataBlob_ - DomainLocalModule::OffsetOfDataBlob();
+#endif
// Check we didnt go out of what we predicted we would need for the class
if (*pOutStaticHandleOffset + TARGET_POINTER_SIZE*dwGCStaticHandles >
return;
}
+#ifndef CROSSBITNESS_COMPILE
+ _ASSERTE(OFFSETOF__ThreadLocalModule__DynamicEntry__m_pDataBlob == ThreadLocalModule::DynamicEntry::GetOffsetOfDataBlob());
+#endif
// Statics for instantiated types are allocated dynamically per-instantiation
if (bDynamic)
{
// Non GC thread statics are embedded in the Dynamic Entry.
- *pOutNonGCStaticOffset = ThreadLocalModule::DynamicEntry::GetOffsetOfDataBlob();
+ *pOutNonGCStaticOffset = OFFSETOF__ThreadLocalModule__DynamicEntry__m_pDataBlob;
return;
}
*pOutStaticHandleOffset = m_pThreadStaticOffsets[index*2];
*pOutNonGCStaticOffset = m_pThreadStaticOffsets[index*2 + 1];
+#ifdef CROSSBITNESS_COMPILE
+ *pOutNonGCStaticOffset += OFFSETOF__ThreadLocalModule__m_pDataBlob - ThreadLocalModule::GetOffsetOfDataBlob();
+#endif
// Check we didnt go out of what we predicted we would need for the class
if (*pOutStaticHandleOffset + TARGET_POINTER_SIZE*dwGCStaticHandles >
if (bmtProp->fDynamicStatics)
{
_ASSERTE(dwNonGCOffset == 0 || // no statics at all
- dwNonGCOffset == DomainLocalModule::DynamicEntry::GetOffsetOfDataBlob()); // We need space to point to the GC statics
+ dwNonGCOffset == OFFSETOF__DomainLocalModule__NormalDynamicEntry__m_pDataBlob); // We need space to point to the GC statics
bmtProp->dwNonGCRegularStaticFieldBytes = dwCumulativeStaticFieldPos;
}
else
if (bmtProp->fDynamicStatics)
{
_ASSERTE(dwNonGCOffset == 0 || // no thread statics at all
- dwNonGCOffset == ThreadLocalModule::DynamicEntry::GetOffsetOfDataBlob()); // We need space to point to the GC statics
+ dwNonGCOffset == OFFSETOF__ThreadLocalModule__DynamicEntry__m_pDataBlob); // We need space to point to the GC statics
bmtProp->dwNonGCThreadStaticFieldBytes = dwCumulativeStaticFieldPos;
}
else
}; // struct ThreadLocalModule
+#define OFFSETOF__ThreadLocalModule__m_pDataBlob (3 * TARGET_POINTER_SIZE /* m_pDynamicClassTable + m_aDynamicEntries + m_pGCStatics */)
+#ifdef FEATURE_64BIT_ALIGNMENT
+#define OFFSETOF__ThreadLocalModule__DynamicEntry__m_pDataBlob (TARGET_POINTER_SIZE /* m_pGCStatics */ + TARGET_POINTER_SIZE /* m_padding */)
+#else
+#define OFFSETOF__ThreadLocalModule__DynamicEntry__m_pDataBlob TARGET_POINTER_SIZE /* m_pGCStatics */
+#endif
typedef DPTR(struct TLMTableEntry) PTR_TLMTableEntry;