File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed
System.Private.CoreLib/src/System/Runtime/ExceptionServices Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class AsmOffsets
2020 public const int OFFSETOF__REGDISPLAY__SP = 0x1b78 ;
2121 public const int OFFSETOF__REGDISPLAY__ControlPC = 0x1b80 ;
2222#else // TARGET_UNIX
23- public const int SIZEOF__REGDISPLAY = 0xbf0 ;
23+ public const int SIZEOF__REGDISPLAY = 0xc70 ;
2424 public const int OFFSETOF__REGDISPLAY__SP = 0xbd8 ;
2525 public const int OFFSETOF__REGDISPLAY__ControlPC = 0xbe0 ;
2626#endif // TARGET_UNIX
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ typedef struct _Arm64VolatileContextPointer
197197} Arm64VolatileContextPointer;
198198#endif // TARGET_ARM64
199199
200- #if defined(TARGET_AMD64) && defined(TARGET_UNIX)
200+ #if defined(TARGET_AMD64)
201201typedef struct _Amd64VolatileContextPointer
202202{
203203 union {
@@ -222,7 +222,7 @@ typedef struct _Amd64VolatileContextPointer
222222 PDWORD64 R[16 ];
223223 };
224224} Amd64VolatileContextPointer;
225- #endif // TARGET_AMD64 && TARGET_UNIX
225+ #endif // TARGET_AMD64
226226
227227#if defined(TARGET_LOONGARCH64)
228228typedef struct _LoongArch64VolatileContextPointer
@@ -280,7 +280,7 @@ struct REGDISPLAY : public REGDISPLAY_BASE {
280280 LoongArch64VolatileContextPointer volatileCurrContextPointers;
281281#endif
282282
283- #if defined(TARGET_AMD64) && defined(TARGET_UNIX)
283+ #if defined(TARGET_AMD64)
284284 Amd64VolatileContextPointer volatileCurrContextPointers;
285285#endif
286286
Original file line number Diff line number Diff line change @@ -70,6 +70,9 @@ Module Name:
7070#ifdef TARGET_X86
7171#include " gc_unwind_x86.h"
7272#endif
73+ #ifdef TARGET_AMD64
74+ #include < minipal/cpufeatures.h>
75+ #endif
7376
7477class MethodDesc ;
7578class ICorJitCompiler ;
@@ -2198,6 +2201,13 @@ class EEJitManager final : public EECodeGenManager
21982201 return m_CPUCompileFlags;
21992202 }
22002203
2204+ #if defined(TARGET_AMD64)
2205+ inline bool IsAPXSupported ()
2206+ {
2207+ return m_CPUCompileFlags.IsSet (InstructionSet_APX);
2208+ }
2209+ #endif // TARGET_AMD64
2210+
22012211private :
22022212 Crst m_JitLoadLock;
22032213
Original file line number Diff line number Diff line change @@ -1502,13 +1502,11 @@ template <typename GcInfoEncoding> OBJECTREF* TGcInfoDecoder<GcInfoEncoding>::Ge
15021502 // The fields of KNONVOLATILE_CONTEXT_POINTERS are in the same order as
15031503 // the processor encoding numbers.
15041504 ULONGLONG **ppRax = &pRD->pCurrentContextPointers ->Rax ;
1505- #if defined(TARGET_UNIX)
1506- if (regNum >= 16 )
1505+ if (ExecutionManager::GetEEJitManager ()->IsAPXSupported () && regNum >= 16 )
15071506 {
15081507 ppRax = &pRD->volatileCurrContextPointers .R16 ;
15091508 return (OBJECTREF*)*(ppRax + regNum - 16 );
15101509 }
1511- #endif // TARGET_UNIX
15121510#endif // FEATURE_NATIVEAOT
15131511
15141512 return (OBJECTREF*)*(ppRax + regNum);
@@ -1529,13 +1527,11 @@ template <typename GcInfoEncoding> OBJECTREF* TGcInfoDecoder<GcInfoEncoding>::Ge
15291527
15301528 // The fields of CONTEXT are in the same order as
15311529 // the processor encoding numbers.
1532- #if defined(TARGET_UNIX)
1533- if (regNum >= 16 )
1530+ if (ExecutionManager::GetEEJitManager ()->IsAPXSupported () && regNum >= 16 )
15341531 {
15351532 ULONGLONG *pRax = &pRD->pCurrentContext ->R16 ;
15361533 return (OBJECTREF*)(pRax + regNum - 16 );
15371534 }
1538- #endif // TARGET_UNIX
15391535 ULONGLONG *pRax = &pRD->pCurrentContext ->Rax ;
15401536
15411537 return (OBJECTREF*)(pRax + regNum);
You can’t perform that action at this time.
0 commit comments