all repos — mgba @ df47cb1f9563ba59baa9fc80aa675b8b529a2cbd

mGBA Game Boy Advance Emulator

All: Const-correctness for PPC
Jeffrey Pfau jeffrey@endrift.com
Wed, 14 Oct 2015 22:00:36 -0700
commit

df47cb1f9563ba59baa9fc80aa675b8b529a2cbd

parent

86dcb7b6c25691fd6dd442b1f22fc4d6ff799dab

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/util/common.hsrc/util/common.h

@@ -52,13 +52,13 @@

#if defined(__PPC__) || defined(__POWERPC__) #define LOAD_32LE(DEST, ADDR, ARR) { \ uint32_t _addr = (ADDR); \ - void* _ptr = (ARR); \ + const void* _ptr = (ARR); \ __asm__("lwbrx %0, %1, %2" : "=r"(DEST) : "b"(_ptr), "r"(_addr)); \ } #define LOAD_16LE(DEST, ADDR, ARR) { \ uint32_t _addr = (ADDR); \ - void* _ptr = (ARR); \ + const void* _ptr = (ARR); \ __asm__("lhbrx %0, %1, %2" : "=r"(DEST) : "b"(_ptr), "r"(_addr)); \ }