Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/coreclr/inc/crosscomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ typedef struct DECLSPEC_ALIGN(16) _T_CONTEXT {
} T_CONTEXT, *PT_CONTEXT;

// _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY (see ExternalAPIs\Win9CoreSystem\inc\winnt.h)
typedef struct _T_RUNTIME_FUNCTION {
#ifdef HOST_UNIX
typedef struct _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY {
DWORD BeginAddress;
union {
DWORD UnwindData;
Expand All @@ -294,12 +295,11 @@ typedef struct _T_RUNTIME_FUNCTION {
DWORD H : 1;
DWORD CR : 2;
DWORD FrameSize : 9;
} PackedUnwindData;
};
};
} T_RUNTIME_FUNCTION, *PT_RUNTIME_FUNCTION;
} IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY, * PIMAGE_ARM64_RUNTIME_FUNCTION_ENTRY;


#ifdef HOST_UNIX

typedef
EXCEPTION_DISPOSITION
Expand All @@ -310,6 +310,8 @@ EXCEPTION_DISPOSITION
PVOID DispatcherContext
);
#endif

typedef IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY T_RUNTIME_FUNCTION, * PT_RUNTIME_FUNCTION;
//
// Define exception dispatch context structure.
//
Expand Down
34 changes: 33 additions & 1 deletion src/coreclr/pal/inc/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -2085,6 +2085,34 @@ typedef struct _KNONVOLATILE_CONTEXT_POINTERS {

} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;

typedef struct _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY {
DWORD BeginAddress;
union {
DWORD UnwindData;
struct {
DWORD Flag : 2;
DWORD FunctionLength : 11;
DWORD RegF : 3;
DWORD RegI : 4;
DWORD H : 1;
DWORD CR : 2;
DWORD FrameSize : 9;
};
};
} IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY, * PIMAGE_ARM64_RUNTIME_FUNCTION_ENTRY;

typedef union IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY_XDATA {
ULONG HeaderData;
struct {
ULONG FunctionLength : 18; // in words (2 bytes)
ULONG Version : 2;
ULONG ExceptionDataPresent : 1;
ULONG EpilogInHeader : 1;
ULONG EpilogCount : 5; // number of epilogs or byte index of the first unwind code for the one only epilog
ULONG CodeWords : 5; // number of dwords with unwind codes
};
} IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY_XDATA;

#elif defined(HOST_LOONGARCH64)

// Please refer to src/coreclr/pal/src/arch/loongarch64/asmconstants.h
Expand Down Expand Up @@ -3139,13 +3167,17 @@ enum {
//
// A function table entry is generated for each frame function.
//
#if defined(HOST_ARM64)
typedef IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
#else // HOST_ARM64
typedef struct _RUNTIME_FUNCTION {
DWORD BeginAddress;
#ifdef TARGET_AMD64
#ifdef HOST_AMD64
DWORD EndAddress;
#endif
DWORD UnwindData;
} RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
#endif // HOST_ARM64

#define STANDARD_RIGHTS_REQUIRED (0x000F0000L)
#define SYNCHRONIZE (0x00100000L)
Expand Down
Loading