Arm64Emitter: Get rid of a pointer cast

This commit is contained in:
Lioncash 2015-10-22 15:32:11 -04:00
parent 018c85c248
commit 2630752ffe
2 changed files with 8 additions and 5 deletions

View File

@ -3,6 +3,7 @@
// Refer to the license.txt file included.
#include <algorithm>
#include <cstring>
#include <vector>
#include "Common/Arm64Emitter.h"
@ -312,6 +313,12 @@ const u8* ARM64XEmitter::AlignCodePage()
return m_code;
}
void ARM64XEmitter::Write32(u32 value)
{
std::memcpy(m_code, &value, sizeof(u32));
m_code += sizeof(u32);
}
void ARM64XEmitter::FlushIcache()
{
FlushIcacheSection(m_lastCacheFlushEnd, m_code);

View File

@ -359,11 +359,7 @@ private:
void EncodeLoadStoreUnscaled(u32 size, u32 op, ARM64Reg Rt, ARM64Reg Rn, s32 imm);
protected:
inline void Write32(u32 value)
{
*(u32*)m_code = value;
m_code += 4;
}
void Write32(u32 value);
public:
ARM64XEmitter()