Skip to content

Commit 5517d55

Browse files
committed
[LoongArch64] Fix the compile error after dotnet#88034.
1 parent 4221d74 commit 5517d55

File tree

1 file changed

+11
-8
lines changed
  • src/coreclr/System.Private.CoreLib/src/System/Runtime/ExceptionServices

1 file changed

+11
-8
lines changed

src/coreclr/System.Private.CoreLib/src/System/Runtime/ExceptionServices/AsmOffsets.cs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ class AsmOffsets
4141
public const int OFFSETOF__REGDISPLAY__SP = 0x628;
4242
public const int OFFSETOF__REGDISPLAY__ControlPC = 0x630;
4343
#elif TARGET_LOONGARCH64
44-
public const int SIZEOF__REGDISPLAY = 0x6C0;
45-
public const int OFFSETOF__REGDISPLAY__SP = 0x628;
46-
public const int OFFSETOF__REGDISPLAY__ControlPC = 0x630;
44+
public const int SIZEOF__REGDISPLAY = 0xc70;
45+
public const int OFFSETOF__REGDISPLAY__SP = 0xbb8;
46+
public const int OFFSETOF__REGDISPLAY__ControlPC = 0xbc0;
4747
#endif
4848

4949
#if TARGET_64BIT
@@ -87,9 +87,9 @@ class AsmOffsets
8787
public const int OFFSETOF__REGDISPLAY__SP = 0x620;
8888
public const int OFFSETOF__REGDISPLAY__ControlPC = 0x628;
8989
#elif TARGET_LOONGARCH64
90-
public const int SIZEOF__REGDISPLAY = 0x6B0;
91-
public const int OFFSETOF__REGDISPLAY__SP = 0x620;
92-
public const int OFFSETOF__REGDISPLAY__ControlPC = 0x628;
90+
public const int SIZEOF__REGDISPLAY = 0xc60;
91+
public const int OFFSETOF__REGDISPLAY__SP = 0xbb0;
92+
public const int OFFSETOF__REGDISPLAY__ControlPC = 0xbb8;
9393
#endif
9494

9595
#if TARGET_64BIT
@@ -121,7 +121,7 @@ class AsmOffsets
121121
#elif TARGET_RISCV64
122122
public const int SIZEOF__PAL_LIMITED_CONTEXT = 0x220;
123123
#elif TARGET_LOONGARCH64
124-
public const int SIZEOF__PAL_LIMITED_CONTEXT = 0x220;
124+
public const int SIZEOF__PAL_LIMITED_CONTEXT = 0x520;
125125
#endif
126126

127127
#if TARGET_AMD64
@@ -141,7 +141,7 @@ class AsmOffsets
141141
public const int OFFSETOF__PAL_LIMITED_CONTEXT__FP = 0x48;
142142
#elif TARGET_LOONGARCH64
143143
public const int OFFSETOF__PAL_LIMITED_CONTEXT__IP = 0x108;
144-
public const int OFFSETOF__PAL_LIMITED_CONTEXT__FP = 0x48;
144+
public const int OFFSETOF__PAL_LIMITED_CONTEXT__FP = 0xb8;
145145
#endif
146146

147147
// Offsets / sizes that are different in 64 / 32 bit mode
@@ -187,6 +187,9 @@ class AsmOffsets
187187
#elif TARGET_RISCV64
188188
static_assert_no_msg(offsetof(CONTEXT, Pc) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__IP);
189189
static_assert_no_msg(offsetof(CONTEXT, Fp) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__FP);
190+
#elif TARGET_LOONGARCH64
191+
static_assert_no_msg(offsetof(CONTEXT, Pc) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__IP);
192+
static_assert_no_msg(offsetof(CONTEXT, Fp) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__FP);
190193
#endif
191194
static_assert_no_msg(sizeof(REGDISPLAY) == AsmOffsets::SIZEOF__REGDISPLAY);
192195
static_assert_no_msg(offsetof(REGDISPLAY, SP) == AsmOffsets::OFFSETOF__REGDISPLAY__SP);

0 commit comments

Comments
 (0)