@@ -44,9 +44,6 @@ GVAL_IMPL_INIT(PTR_VOID, g_ReturnFromUniversalTransitionAddr, PointerToReturnFro
44
44
45
45
EXTERN_C PTR_VOID PointerToReturnFromUniversalTransition_DebugStepTailCall;
46
46
GVAL_IMPL_INIT (PTR_VOID, g_ReturnFromUniversalTransition_DebugStepTailCallAddr, PointerToReturnFromUniversalTransition_DebugStepTailCall);
47
-
48
- EXTERN_C PTR_VOID PointerToReturnFromCallDescrThunk;
49
- GVAL_IMPL_INIT (PTR_VOID, g_ReturnFromCallDescrThunkAddr, PointerToReturnFromCallDescrThunk);
50
47
#endif
51
48
52
49
#ifdef TARGET_X86
@@ -1200,130 +1197,6 @@ void StackFrameIterator::UnwindUniversalTransitionThunk()
1200
1197
#define STACK_ALIGN_SIZE 4
1201
1198
#endif
1202
1199
1203
- #ifdef TARGET_AMD64
1204
- struct CALL_DESCR_CONTEXT
1205
- {
1206
- uintptr_t Rbp;
1207
- uintptr_t Rsi;
1208
- uintptr_t Rbx;
1209
- uintptr_t IP;
1210
- };
1211
- #elif defined(TARGET_ARM)
1212
- struct CALL_DESCR_CONTEXT
1213
- {
1214
- uintptr_t R4;
1215
- uintptr_t R5;
1216
- uintptr_t R7;
1217
- uintptr_t IP;
1218
- };
1219
- #elif defined(TARGET_ARM64)
1220
- struct CALL_DESCR_CONTEXT
1221
- {
1222
- uintptr_t FP;
1223
- uintptr_t IP;
1224
- uintptr_t X19;
1225
- uintptr_t X20;
1226
- };
1227
- #elif defined(TARGET_X86)
1228
- struct CALL_DESCR_CONTEXT
1229
- {
1230
- uintptr_t Rbx;
1231
- uintptr_t Rbp;
1232
- uintptr_t IP;
1233
- };
1234
- #elif defined (TARGET_WASM)
1235
- struct CALL_DESCR_CONTEXT
1236
- {
1237
- uintptr_t IP;
1238
- };
1239
- #else
1240
- #error NYI - For this arch
1241
- #endif
1242
-
1243
- typedef DPTR (CALL_DESCR_CONTEXT) PTR_CALL_DESCR_CONTEXT;
1244
-
1245
- void StackFrameIterator::UnwindCallDescrThunk ()
1246
- {
1247
- ASSERT ((m_dwFlags & MethodStateCalculated) == 0 );
1248
-
1249
- #if defined(USE_PORTABLE_HELPERS) // @TODO: Corresponding helper code is only defined in assembly code
1250
- return ;
1251
- #else // defined(USE_PORTABLE_HELPERS)
1252
- ASSERT (CategorizeUnadjustedReturnAddress (m_ControlPC) == InCallDescrThunk);
1253
-
1254
- uintptr_t newSP;
1255
- #ifdef TARGET_AMD64
1256
- // RBP points to the SP that we want to capture. (This arrangement allows for
1257
- // the arguments from this function to be loaded into memory with an adjustment
1258
- // to SP, like an alloca
1259
- newSP = *(PTR_UIntNative)m_RegDisplay.pRbp ;
1260
-
1261
- PTR_CALL_DESCR_CONTEXT pContext = (PTR_CALL_DESCR_CONTEXT)newSP;
1262
-
1263
- m_RegDisplay.pRbp = PTR_TO_MEMBER (CALL_DESCR_CONTEXT, pContext, Rbp);
1264
- m_RegDisplay.pRsi = PTR_TO_MEMBER (CALL_DESCR_CONTEXT, pContext, Rsi);
1265
- m_RegDisplay.pRbx = PTR_TO_MEMBER (CALL_DESCR_CONTEXT, pContext, Rbx);
1266
-
1267
- // And adjust SP to be the state that it should be in just after returning from
1268
- // the CallDescrFunction
1269
- newSP += sizeof (CALL_DESCR_CONTEXT);
1270
- #elif defined(TARGET_ARM)
1271
- // R7 points to the SP that we want to capture. (This arrangement allows for
1272
- // the arguments from this function to be loaded into memory with an adjustment
1273
- // to SP, like an alloca
1274
- newSP = *(PTR_UIntNative)m_RegDisplay.pR7 ;
1275
- PTR_CALL_DESCR_CONTEXT pContext = (PTR_CALL_DESCR_CONTEXT)newSP;
1276
-
1277
- m_RegDisplay.pR4 = PTR_TO_MEMBER (CALL_DESCR_CONTEXT, pContext, R4);
1278
- m_RegDisplay.pR5 = PTR_TO_MEMBER (CALL_DESCR_CONTEXT, pContext, R5);
1279
- m_RegDisplay.pR7 = PTR_TO_MEMBER (CALL_DESCR_CONTEXT, pContext, R7);
1280
-
1281
- // And adjust SP to be the state that it should be in just after returning from
1282
- // the CallDescrFunction
1283
- newSP += sizeof (CALL_DESCR_CONTEXT);
1284
-
1285
- #elif defined(TARGET_ARM64)
1286
- // pFP points to the SP that we want to capture. (This arrangement allows for
1287
- // the arguments from this function to be loaded into memory with an adjustment
1288
- // to SP, like an alloca
1289
- newSP = *(PTR_UIntNative)m_RegDisplay.pFP ;
1290
- PTR_CALL_DESCR_CONTEXT pContext = (PTR_CALL_DESCR_CONTEXT)newSP;
1291
-
1292
- m_RegDisplay.pX19 = PTR_TO_MEMBER (CALL_DESCR_CONTEXT, pContext, X19);
1293
- m_RegDisplay.pX20 = PTR_TO_MEMBER (CALL_DESCR_CONTEXT, pContext, X20);
1294
-
1295
- // And adjust SP to be the state that it should be in just after returning from
1296
- // the CallDescrFunction
1297
- newSP += sizeof (CALL_DESCR_CONTEXT);
1298
-
1299
- #elif defined(TARGET_X86)
1300
- // RBP points to the SP that we want to capture. (This arrangement allows for
1301
- // the arguments from this function to be loaded into memory with an adjustment
1302
- // to SP, like an alloca
1303
- newSP = *(PTR_UIntNative)m_RegDisplay.pRbp ;
1304
-
1305
- PTR_CALL_DESCR_CONTEXT pContext = (PTR_CALL_DESCR_CONTEXT)(newSP - offsetof (CALL_DESCR_CONTEXT, Rbp));
1306
-
1307
- m_RegDisplay.pRbp = PTR_TO_MEMBER (CALL_DESCR_CONTEXT, pContext, Rbp);
1308
- m_RegDisplay.pRbx = PTR_TO_MEMBER (CALL_DESCR_CONTEXT, pContext, Rbx);
1309
-
1310
- // And adjust SP to be the state that it should be in just after returning from
1311
- // the CallDescrFunction
1312
- newSP += sizeof (CALL_DESCR_CONTEXT) - offsetof (CALL_DESCR_CONTEXT, Rbp);
1313
-
1314
- #else
1315
- PORTABILITY_ASSERT (" UnwindCallDescrThunk" );
1316
- PTR_CALL_DESCR_CONTEXT pContext = NULL ;
1317
- #endif
1318
-
1319
- m_RegDisplay.SetAddrOfIP (PTR_TO_MEMBER (CALL_DESCR_CONTEXT, pContext, IP));
1320
- m_RegDisplay.SetIP (pContext->IP );
1321
- m_RegDisplay.SetSP (newSP);
1322
- SetControlPC (dac_cast<PTR_VOID>(pContext->IP ));
1323
-
1324
- #endif // defined(USE_PORTABLE_HELPERS)
1325
- }
1326
-
1327
1200
void StackFrameIterator::UnwindThrowSiteThunk ()
1328
1201
{
1329
1202
ASSERT ((m_dwFlags & MethodStateCalculated) == 0 );
@@ -1659,11 +1532,7 @@ void StackFrameIterator::UnwindNonEHThunkSequence()
1659
1532
{
1660
1533
ASSERT (m_pConservativeStackRangeLowerBound == NULL );
1661
1534
1662
- if (category == InCallDescrThunk)
1663
- {
1664
- UnwindCallDescrThunk ();
1665
- }
1666
- else if (category == InUniversalTransitionThunk)
1535
+ if (category == InUniversalTransitionThunk)
1667
1536
{
1668
1537
UnwindUniversalTransitionThunk ();
1669
1538
ASSERT (m_pConservativeStackRangeLowerBound != NULL );
@@ -1856,7 +1725,6 @@ bool StackFrameIterator::IsNonEHThunk(ReturnAddressCategory category)
1856
1725
default :
1857
1726
return false ;
1858
1727
case InUniversalTransitionThunk:
1859
- case InCallDescrThunk:
1860
1728
return true ;
1861
1729
}
1862
1730
}
@@ -1926,11 +1794,7 @@ StackFrameIterator::ReturnAddressCategory StackFrameIterator::CategorizeUnadjust
1926
1794
#else // defined(USE_PORTABLE_HELPERS)
1927
1795
1928
1796
#if defined(FEATURE_DYNAMIC_CODE)
1929
- if (EQUALS_RETURN_ADDRESS (returnAddress, ReturnFromCallDescrThunk))
1930
- {
1931
- return InCallDescrThunk;
1932
- }
1933
- else if (EQUALS_RETURN_ADDRESS (returnAddress, ReturnFromUniversalTransition) ||
1797
+ if (EQUALS_RETURN_ADDRESS (returnAddress, ReturnFromUniversalTransition) ||
1934
1798
EQUALS_RETURN_ADDRESS (returnAddress, ReturnFromUniversalTransition_DebugStepTailCall))
1935
1799
{
1936
1800
return InUniversalTransitionThunk;
0 commit comments