summaryrefslogtreecommitdiff
path: root/src/core/mem_map_funcs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/mem_map_funcs.cpp')
-rw-r--r--src/core/mem_map_funcs.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/core/mem_map_funcs.cpp b/src/core/mem_map_funcs.cpp
index 4f93c0e64..48f61db4e 100644
--- a/src/core/mem_map_funcs.cpp
+++ b/src/core/mem_map_funcs.cpp
@@ -236,30 +236,12 @@ u8 Read8(const VAddr addr) {
236u16 Read16(const VAddr addr) { 236u16 Read16(const VAddr addr) {
237 u16_le data = 0; 237 u16_le data = 0;
238 Read<u16_le>(data, addr); 238 Read<u16_le>(data, addr);
239
240 // Check for 16-bit unaligned memory reads...
241 if (addr & 1) {
242 // TODO(bunnei): Implement 16-bit unaligned memory reads
243 LOG_ERROR(HW_Memory, "16-bit unaligned memory reads are not implemented!");
244 }
245
246 return (u16)data; 239 return (u16)data;
247} 240}
248 241
249u32 Read32(const VAddr addr) { 242u32 Read32(const VAddr addr) {
250 u32_le data = 0; 243 u32_le data = 0;
251 Read<u32_le>(data, addr); 244 Read<u32_le>(data, addr);
252
253 // Check for 32-bit unaligned memory reads...
254 if (addr & 3) {
255 // ARM allows for unaligned memory reads, however older ARM architectures read out memory
256 // from unaligned addresses in a shifted way. Our ARM CPU core (SkyEye) corrects for this,
257 // so therefore expects the memory to be read out in this manner.
258 // TODO(bunnei): Determine if this is necessary - perhaps it is OK to remove this from both
259 // SkyEye and here?
260 int shift = (addr & 3) * 8;
261 data = (data << shift) | (data >> (32 - shift));
262 }
263 return (u32)data; 245 return (u32)data;
264} 246}
265 247