@@ -1071,17 +1071,23 @@ ProcessCLRException(IN PEXCEPTION_RECORD pExceptionRecord
1071
1071
1072
1072
CLRUnwindStatus status;
1073
1073
1074
+ #ifdef USE_PER_FRAME_PINVOKE_INIT
1074
1075
// Refer to comment in ProcessOSExceptionNotification about ICF and codegen difference.
1075
- ARM_ONLY (InlinedCallFrame *pICFSetAsLimitFrame = NULL ;)
1076
-
1076
+ InlinedCallFrame *pICFSetAsLimitFrame = NULL ;
1077
+ #endif // USE_PER_FRAME_PINVOKE_INIT
1078
+
1077
1079
status = pTracker->ProcessOSExceptionNotification (
1078
1080
pExceptionRecord,
1079
1081
pContextRecord,
1080
1082
pDispatcherContext,
1081
1083
dwExceptionFlags,
1082
1084
sf,
1083
1085
pThread,
1084
- STState ARM_ARG ((PVOID)pICFSetAsLimitFrame));
1086
+ STState
1087
+ #ifdef USE_PER_FRAME_PINVOKE_INIT
1088
+ , (PVOID)pICFSetAsLimitFrame
1089
+ #endif // USE_PER_FRAME_PINVOKE_INIT
1090
+ );
1085
1091
1086
1092
if (FirstPassComplete == status)
1087
1093
{
@@ -1184,7 +1190,7 @@ ProcessCLRException(IN PEXCEPTION_RECORD pExceptionRecord
1184
1190
1185
1191
1186
1192
CONSISTENCY_CHECK (pLimitFrame > dac_cast<PTR_VOID>(GetSP (pContextRecord)));
1187
- #if defined(_TARGET_ARM_)
1193
+ #ifdef USE_PER_FRAME_PINVOKE_INIT
1188
1194
if (pICFSetAsLimitFrame != NULL )
1189
1195
{
1190
1196
_ASSERTE (pICFSetAsLimitFrame == pLimitFrame);
@@ -1196,7 +1202,7 @@ ProcessCLRException(IN PEXCEPTION_RECORD pExceptionRecord
1196
1202
// the next pinvoke callsite does not see the frame as active.
1197
1203
pICFSetAsLimitFrame->Reset ();
1198
1204
}
1199
- #endif // defined(_TARGET_ARM_)
1205
+ #endif // USE_PER_FRAME_PINVOKE_INIT
1200
1206
1201
1207
pThread->SetFrame (pLimitFrame);
1202
1208
@@ -1653,7 +1659,11 @@ CLRUnwindStatus ExceptionTracker::ProcessOSExceptionNotification(
1653
1659
DWORD dwExceptionFlags,
1654
1660
StackFrame sf,
1655
1661
Thread* pThread,
1656
- StackTraceState STState ARM_ARG (PVOID pICFSetAsLimitFrame))
1662
+ StackTraceState STState
1663
+ #ifdef USE_PER_FRAME_PINVOKE_INIT
1664
+ , PVOID pICFSetAsLimitFrame
1665
+ #endif // USE_PER_FRAME_PINVOKE_INIT
1666
+ )
1657
1667
{
1658
1668
CONTRACTL
1659
1669
{
@@ -1719,10 +1729,10 @@ CLRUnwindStatus ExceptionTracker::ProcessOSExceptionNotification(
1719
1729
this ->m_EnclosingClauseInfoForGCReporting .SetEnclosingClauseCallerSP (uCallerSP);
1720
1730
}
1721
1731
1722
- #if defined(_TARGET_ARM_)
1732
+ #ifdef USE_PER_FRAME_PINVOKE_INIT
1723
1733
// Refer to detailed comment below.
1724
1734
PTR_Frame pICFForUnwindTarget = NULL ;
1725
- #endif // defined(_TARGET_ARM_)
1735
+ #endif // USE_PER_FRAME_PINVOKE_INIT
1726
1736
1727
1737
CheckForRudeAbort (pThread, fIsFirstPass );
1728
1738
@@ -1751,7 +1761,7 @@ CLRUnwindStatus ExceptionTracker::ProcessOSExceptionNotification(
1751
1761
1752
1762
while (((UINT_PTR)pFrame) < uCallerSP)
1753
1763
{
1754
- #if defined(_TARGET_ARM_)
1764
+ #ifdef USE_PER_FRAME_PINVOKE_INIT
1755
1765
// InlinedCallFrames (ICF) are allocated, initialized and linked to the Frame chain
1756
1766
// by the code generated by the JIT for a method containing a PInvoke.
1757
1767
//
@@ -1956,7 +1966,7 @@ CLRUnwindStatus ExceptionTracker::ProcessOSExceptionNotification(
1956
1966
1957
1967
if (fTargetUnwind && (status == SecondPassComplete))
1958
1968
{
1959
- #if defined(_TARGET_ARM_)
1969
+ #ifdef USE_PER_FRAME_PINVOKE_INIT
1960
1970
// If we have got a ICF to set as the LimitFrame, do that now.
1961
1971
// The Frame chain is still intact and would be updated using
1962
1972
// the LimitFrame (done after the catch handler returns).
@@ -1968,7 +1978,7 @@ CLRUnwindStatus ExceptionTracker::ProcessOSExceptionNotification(
1968
1978
m_pLimitFrame = pICFForUnwindTarget;
1969
1979
pICFSetAsLimitFrame = (PVOID)pICFForUnwindTarget;
1970
1980
}
1971
- #endif // _TARGET_ARM_
1981
+ #endif // USE_PER_FRAME_PINVOKE_INIT
1972
1982
1973
1983
// Since second pass is complete and we have reached
1974
1984
// the frame containing the catch funclet, reset the enclosing
0 commit comments