mirror of https://github.com/mgba-emu/mgba.git
All: Const-correctness for PPC
This commit is contained in:
parent
4c176ef51b
commit
0211106a3d
|
@ -52,13 +52,13 @@ typedef intptr_t ssize_t;
|
||||||
#if defined(__PPC__) || defined(__POWERPC__)
|
#if defined(__PPC__) || defined(__POWERPC__)
|
||||||
#define LOAD_32LE(DEST, ADDR, ARR) { \
|
#define LOAD_32LE(DEST, ADDR, ARR) { \
|
||||||
uint32_t _addr = (ADDR); \
|
uint32_t _addr = (ADDR); \
|
||||||
void* _ptr = (ARR); \
|
const void* _ptr = (ARR); \
|
||||||
__asm__("lwbrx %0, %1, %2" : "=r"(DEST) : "b"(_ptr), "r"(_addr)); \
|
__asm__("lwbrx %0, %1, %2" : "=r"(DEST) : "b"(_ptr), "r"(_addr)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LOAD_16LE(DEST, ADDR, ARR) { \
|
#define LOAD_16LE(DEST, ADDR, ARR) { \
|
||||||
uint32_t _addr = (ADDR); \
|
uint32_t _addr = (ADDR); \
|
||||||
void* _ptr = (ARR); \
|
const void* _ptr = (ARR); \
|
||||||
__asm__("lhbrx %0, %1, %2" : "=r"(DEST) : "b"(_ptr), "r"(_addr)); \
|
__asm__("lhbrx %0, %1, %2" : "=r"(DEST) : "b"(_ptr), "r"(_addr)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue