Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LoongArch64] Fix the compile error after #88034. #91109

Merged
merged 1 commit into from
Aug 25, 2023
Merged
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
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