mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 15:49:25 +01:00
Merge pull request #6248 from JonnyH/WIP/fix-arm64-MOVI2R-values-between-2gb-and-4gb-of-pc
Fix arm64 MOVI2R for addresses between 2gb and 4gb offset from PC
This commit is contained in:
commit
aeaca502f0
@ -2029,7 +2029,8 @@ void ARM64XEmitter::MOVI2R(ARM64Reg Rd, u64 imm, bool optimize)
|
||||
|
||||
u64 aligned_pc = (u64)GetCodePtr() & ~0xFFF;
|
||||
s64 aligned_offset = (s64)imm - (s64)aligned_pc;
|
||||
if (upload_part.Count() > 1 && std::abs(aligned_offset) < 0xFFFFFFFFLL)
|
||||
// The offset for ADR/ADRP is an s32, so make sure it can be represented in that
|
||||
if (upload_part.Count() > 1 && std::abs(aligned_offset) < 0x7FFFFFFFLL)
|
||||
{
|
||||
// Immediate we are loading is within 4GB of our aligned range
|
||||
// Most likely a address that we can load in one or two instructions
|
||||
|
Loading…
x
Reference in New Issue
Block a user