Skip to content

Commit

Permalink
Merge pull request #11074 from JosJuice/jitarm64-spr-tl-alignment
Browse files Browse the repository at this point in the history
JitArm64: Enforce correct alignment of SPR_TL
  • Loading branch information
JosJuice committed Sep 20, 2022
2 parents d04e1ca + 6203c10 commit 4ea694a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Expand Up @@ -336,6 +336,7 @@ void JitArm64::mfspr(UGeckoInstruction inst)

ADD(Xresult, XA, Xresult, ArithOption(Xresult, ShiftType::LSR, 3));
STR(IndexType::Unsigned, Xresult, PPC_REG, PPCSTATE_OFF_SPR(SPR_TL));
static_assert((PPCSTATE_OFF_SPR(SPR_TL) & 0x7) == 0);

if (CanMergeNextInstructions(1))
{
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/Core/PowerPC/PowerPC.h
Expand Up @@ -160,7 +160,8 @@ struct PowerPCState

// special purpose registers - controls quantizers, DMA, and lots of other misc extensions.
// also for power management, but we don't care about that.
u32 spr[1024]{};
// JitArm64 needs 64-bit alignment for SPR_TL.
alignas(8) u32 spr[1024]{};

// Storage for the stack pointer of the BLR optimization.
u8* stored_stack_pointer = nullptr;
Expand Down

0 comments on commit 4ea694a

Please sign in to comment.