Skip to content

Commit 7ce83de

Browse files
authored
[RISC-V] Fix build error (#84910)
- Resolve assertion because size of DT_CONTEXT and T_CONTEXT is not equal
1 parent f92b9ef commit 7ce83de

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/coreclr/debug/inc/dbgtargetcontext.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ typedef DECLSPEC_ALIGN(16) struct {
560560
//
561561

562562
/* +0x000 */ DWORD ContextFlags;
563+
/* +0x004 */ DWORD Fcsr;
563564

564565
//
565566
// Integer registers

src/coreclr/inc/crosscomp.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,7 @@ typedef struct _T_KNONVOLATILE_CONTEXT_POINTERS {
525525

526526
//
527527
// Specify the number of breakpoints and watchpoints that the OS
528-
// will track. Architecturally, LOONGARCH64 supports up to 16. In practice,
529-
// however, almost no one implements more than 4 of each.
528+
// will track.
530529
//
531530

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

543542
/* +0x000 */ DWORD ContextFlags;
543+
/* +0x004 */ DWORD Fcsr;
544544

545545
//
546546
// Integer registers
@@ -584,7 +584,6 @@ typedef struct DECLSPEC_ALIGN(16) _T_CONTEXT {
584584
//
585585
//TODO-RISCV64: support the SIMD.
586586
ULONGLONG F[32];
587-
DWORD Fcsr;
588587
} T_CONTEXT, *PT_CONTEXT;
589588

590589
// _IMAGE_RISCV64_RUNTIME_FUNCTION_ENTRY (see ExternalAPIs\Win9CoreSystem\inc\winnt.h)

src/coreclr/pal/inc/pal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2280,6 +2280,7 @@ typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
22802280
//
22812281

22822282
/* +0x000 */ DWORD ContextFlags;
2283+
/* +0x004 */ DWORD Fcsr;
22832284

22842285
//
22852286
// Integer registers.
@@ -2323,7 +2324,6 @@ typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
23232324
//
23242325
// TODO-RISCV64: support the SIMD.
23252326
ULONGLONG F[32];
2326-
DWORD Fcsr;
23272327
} CONTEXT, *PCONTEXT, *LPCONTEXT;
23282328

23292329
//

src/coreclr/vm/riscv64/asmconstants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ ASMCONSTANTS_C_ASSERT(SIZEOF__GSCookie == sizeof(GSCookie));
141141
#define SIZEOF__Frame 0x10
142142
ASMCONSTANTS_C_ASSERT(SIZEOF__Frame == sizeof(Frame));
143143

144-
#define SIZEOF__CONTEXT 0x220
144+
#define SIZEOF__CONTEXT 0x210
145145
ASMCONSTANTS_C_ASSERT(SIZEOF__CONTEXT == sizeof(T_CONTEXT));
146146

147147

0 commit comments

Comments
 (0)