summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2015-10-22 15:32:11 -0400
committerLioncash <mathew1800@gmail.com>2015-10-22 15:32:11 -0400
commit2630752ffea63ecc1ddffa8a4fc18ec63bae22bc (patch)
treedeea1ec5f755fc052b4b0cf1341d0c0e0aaf0a01 /Source/Core/Common
parent018c85c24876e2d87faa6567764a6005b1743f3a (diff)
Arm64Emitter: Get rid of a pointer cast
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/Arm64Emitter.cpp7
-rw-r--r--Source/Core/Common/Arm64Emitter.h6
2 files changed, 8 insertions, 5 deletions
diff --git a/Source/Core/Common/Arm64Emitter.cpp b/Source/Core/Common/Arm64Emitter.cpp
index 1c173731cf..6546686716 100644
--- a/Source/Core/Common/Arm64Emitter.cpp
+++ b/Source/Core/Common/Arm64Emitter.cpp
@@ -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);
diff --git a/Source/Core/Common/Arm64Emitter.h b/Source/Core/Common/Arm64Emitter.h
index 5cb353f640..400a87a624 100644
--- a/Source/Core/Common/Arm64Emitter.h
+++ b/Source/Core/Common/Arm64Emitter.h
@@ -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()