Skip to content

Commit

Permalink
[RISC-V] Fix build error (#84910)
Browse files Browse the repository at this point in the history
- Resolve assertion because size of DT_CONTEXT and T_CONTEXT is not equal
  • Loading branch information
clamp03 committed Apr 17, 2023
1 parent f92b9ef commit 7ce83de
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/coreclr/debug/inc/dbgtargetcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ typedef DECLSPEC_ALIGN(16) struct {
//

/* +0x000 */ DWORD ContextFlags;
/* +0x004 */ DWORD Fcsr;

//
// Integer registers
Expand Down
5 changes: 2 additions & 3 deletions src/coreclr/inc/crosscomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,7 @@ typedef struct _T_KNONVOLATILE_CONTEXT_POINTERS {

//
// Specify the number of breakpoints and watchpoints that the OS
// will track. Architecturally, LOONGARCH64 supports up to 16. In practice,
// however, almost no one implements more than 4 of each.
// will track.
//

#define RISCV64_MAX_BREAKPOINTS 8
Expand All @@ -541,6 +540,7 @@ typedef struct DECLSPEC_ALIGN(16) _T_CONTEXT {
//

/* +0x000 */ DWORD ContextFlags;
/* +0x004 */ DWORD Fcsr;

//
// Integer registers
Expand Down Expand Up @@ -584,7 +584,6 @@ typedef struct DECLSPEC_ALIGN(16) _T_CONTEXT {
//
//TODO-RISCV64: support the SIMD.
ULONGLONG F[32];
DWORD Fcsr;
} T_CONTEXT, *PT_CONTEXT;

// _IMAGE_RISCV64_RUNTIME_FUNCTION_ENTRY (see ExternalAPIs\Win9CoreSystem\inc\winnt.h)
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/pal/inc/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -2280,6 +2280,7 @@ typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
//

/* +0x000 */ DWORD ContextFlags;
/* +0x004 */ DWORD Fcsr;

//
// Integer registers.
Expand Down Expand Up @@ -2323,7 +2324,6 @@ typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
//
// TODO-RISCV64: support the SIMD.
ULONGLONG F[32];
DWORD Fcsr;
} CONTEXT, *PCONTEXT, *LPCONTEXT;

//
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/riscv64/asmconstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ ASMCONSTANTS_C_ASSERT(SIZEOF__GSCookie == sizeof(GSCookie));
#define SIZEOF__Frame 0x10
ASMCONSTANTS_C_ASSERT(SIZEOF__Frame == sizeof(Frame));

#define SIZEOF__CONTEXT 0x220
#define SIZEOF__CONTEXT 0x210
ASMCONSTANTS_C_ASSERT(SIZEOF__CONTEXT == sizeof(T_CONTEXT));


Expand Down

0 comments on commit 7ce83de

Please sign in to comment.