fix aarch64 build with gcc 11

This commit is contained in:
RSDuck 2021-04-29 15:15:16 +02:00
parent eae42fb9f8
commit 0a3a2ad009
2 changed files with 3 additions and 2 deletions

View File

@ -483,12 +483,12 @@ void Compiler::LoadReg(int reg, ARM64Reg nativeReg)
if (reg == 15)
MOVI2R(nativeReg, R15);
else
LDR(INDEX_UNSIGNED, nativeReg, RCPU, offsetof(ARM, R[reg]));
LDR(INDEX_UNSIGNED, nativeReg, RCPU, offsetof(ARM, R) + reg*4);
}
void Compiler::SaveReg(int reg, ARM64Reg nativeReg)
{
STR(INDEX_UNSIGNED, nativeReg, RCPU, offsetof(ARM, R[reg]));
STR(INDEX_UNSIGNED, nativeReg, RCPU, offsetof(ARM, R) + reg*4);
}
void Compiler::LoadCPSR()

View File

@ -7,6 +7,7 @@
#include <cinttypes>
#include <cstring>
#include <vector>
#include <limits>
#include "Compat.h"
#include "Align.h"