All: Const-correctness for PPC
Jeffrey Pfau jeffrey@endrift.com
Wed, 14 Oct 2015 22:00:36 -0700
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
src/util/common.h
→
src/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)); \ }