Skip to content

Commit

Permalink
[LoongArch64] Fix the compile error after dotnet#88034.
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyXu-HF committed Aug 25, 2023
1 parent 4221d74 commit 5517d55
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class AsmOffsets
public const int OFFSETOF__REGDISPLAY__SP = 0x628;
public const int OFFSETOF__REGDISPLAY__ControlPC = 0x630;
#elif TARGET_LOONGARCH64
public const int SIZEOF__REGDISPLAY = 0x6C0;
public const int OFFSETOF__REGDISPLAY__SP = 0x628;
public const int OFFSETOF__REGDISPLAY__ControlPC = 0x630;
public const int SIZEOF__REGDISPLAY = 0xc70;
public const int OFFSETOF__REGDISPLAY__SP = 0xbb8;
public const int OFFSETOF__REGDISPLAY__ControlPC = 0xbc0;
#endif

#if TARGET_64BIT
Expand Down Expand Up @@ -87,9 +87,9 @@ class AsmOffsets
public const int OFFSETOF__REGDISPLAY__SP = 0x620;
public const int OFFSETOF__REGDISPLAY__ControlPC = 0x628;
#elif TARGET_LOONGARCH64
public const int SIZEOF__REGDISPLAY = 0x6B0;
public const int OFFSETOF__REGDISPLAY__SP = 0x620;
public const int OFFSETOF__REGDISPLAY__ControlPC = 0x628;
public const int SIZEOF__REGDISPLAY = 0xc60;
public const int OFFSETOF__REGDISPLAY__SP = 0xbb0;
public const int OFFSETOF__REGDISPLAY__ControlPC = 0xbb8;
#endif

#if TARGET_64BIT
Expand Down Expand Up @@ -121,7 +121,7 @@ class AsmOffsets
#elif TARGET_RISCV64
public const int SIZEOF__PAL_LIMITED_CONTEXT = 0x220;
#elif TARGET_LOONGARCH64
public const int SIZEOF__PAL_LIMITED_CONTEXT = 0x220;
public const int SIZEOF__PAL_LIMITED_CONTEXT = 0x520;
#endif

#if TARGET_AMD64
Expand All @@ -141,7 +141,7 @@ class AsmOffsets
public const int OFFSETOF__PAL_LIMITED_CONTEXT__FP = 0x48;
#elif TARGET_LOONGARCH64
public const int OFFSETOF__PAL_LIMITED_CONTEXT__IP = 0x108;
public const int OFFSETOF__PAL_LIMITED_CONTEXT__FP = 0x48;
public const int OFFSETOF__PAL_LIMITED_CONTEXT__FP = 0xb8;
#endif

// Offsets / sizes that are different in 64 / 32 bit mode
Expand Down Expand Up @@ -187,6 +187,9 @@ class AsmOffsets
#elif TARGET_RISCV64
static_assert_no_msg(offsetof(CONTEXT, Pc) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__IP);
static_assert_no_msg(offsetof(CONTEXT, Fp) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__FP);
#elif TARGET_LOONGARCH64
static_assert_no_msg(offsetof(CONTEXT, Pc) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__IP);
static_assert_no_msg(offsetof(CONTEXT, Fp) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__FP);
#endif
static_assert_no_msg(sizeof(REGDISPLAY) == AsmOffsets::SIZEOF__REGDISPLAY);
static_assert_no_msg(offsetof(REGDISPLAY, SP) == AsmOffsets::OFFSETOF__REGDISPLAY__SP);
Expand Down

0 comments on commit 5517d55

Please sign in to comment.