Merge pull request #7368 from lioncash/const-cast

Arm64Emitter: Make the Align* functions return a non-const data pointer
This commit is contained in:
Pierre Bourdon 2018-08-27 15:54:05 +02:00 committed by GitHub
commit 25898cfa55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -328,7 +328,7 @@ void ARM64XEmitter::ReserveCodeSpace(u32 bytes)
BRK(0);
}
const u8* ARM64XEmitter::AlignCode16()
u8* ARM64XEmitter::AlignCode16()
{
int c = int((u64)m_code & 15);
if (c)
@ -336,7 +336,7 @@ const u8* ARM64XEmitter::AlignCode16()
return m_code;
}
const u8* ARM64XEmitter::AlignCodePage()
u8* ARM64XEmitter::AlignCodePage()
{
int c = int((u64)m_code & 4095);
if (c)

View File

@ -543,8 +543,8 @@ public:
void SetCodePtr(u8* ptr);
void SetCodePtrUnsafe(u8* ptr);
void ReserveCodeSpace(u32 bytes);
const u8* AlignCode16();
const u8* AlignCodePage();
u8* AlignCode16();
u8* AlignCodePage();
const u8* GetCodePtr() const;
void FlushIcache();
void FlushIcacheSection(u8* start, u8* end);

View File

@ -338,7 +338,7 @@ void JitArm64::GenerateCommonAsm()
JitRegister::Register(start, GetCodePtr(), "JIT_QuantizedLoad");
paired_load_quantized = reinterpret_cast<const u8**>(const_cast<u8*>(AlignCode16()));
paired_load_quantized = reinterpret_cast<const u8**>(AlignCode16());
ReserveCodeSpace(8 * sizeof(u8*));
paired_load_quantized[0] = loadPairedFloatTwo;
@ -350,7 +350,7 @@ void JitArm64::GenerateCommonAsm()
paired_load_quantized[6] = loadPairedS8Two;
paired_load_quantized[7] = loadPairedS16Two;
single_load_quantized = reinterpret_cast<const u8**>(const_cast<u8*>(AlignCode16()));
single_load_quantized = reinterpret_cast<const u8**>(AlignCode16());
ReserveCodeSpace(8 * sizeof(u8*));
single_load_quantized[0] = loadPairedFloatOne;
@ -613,7 +613,7 @@ void JitArm64::GenerateCommonAsm()
JitRegister::Register(start, GetCodePtr(), "JIT_QuantizedStore");
paired_store_quantized = reinterpret_cast<const u8**>(const_cast<u8*>(AlignCode16()));
paired_store_quantized = reinterpret_cast<const u8**>(AlignCode16());
ReserveCodeSpace(32 * sizeof(u8*));
// Fast