all repos — mgba @ cda462e24febd6b5dbc206aef67c5b46b73d6e1b

mGBA Game Boy Advance Emulator

All: Fix asm to __asm__ in PPC code
Jeffrey Pfau jeffrey@endrift.com
Tue, 09 Jun 2015 21:22:32 -0700
commit

cda462e24febd6b5dbc206aef67c5b46b73d6e1b

parent

97da8b43c97157d3b27d3a338605ccc4b76647ac

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

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

@@ -49,25 +49,25 @@ #if defined(__PPC__) || defined(__POWERPC__)

#define LOAD_32LE(DEST, ADDR, ARR) { \ uint32_t _addr = (ADDR); \ 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) { \ uint32_t _addr = (ADDR); \ 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)); \ } #define STORE_32LE(SRC, ADDR, ARR) { \ uint32_t _addr = (ADDR); \ void* _ptr = (ARR); \ - asm("stwbrx %0, %1, %2" : : "r"(SRC), "b"(_ptr), "r"(_addr)); \ + __asm__("stwbrx %0, %1, %2" : : "r"(SRC), "b"(_ptr), "r"(_addr)); \ } #define STORE_16LE(SRC, ADDR, ARR) { \ uint32_t _addr = (ADDR); \ void* _ptr = (ARR); \ - asm("sthbrx %0, %1, %2" : : "r"(SRC), "b"(_ptr), "r"(_addr)); \ + __asm__("sthbrx %0, %1, %2" : : "r"(SRC), "b"(_ptr), "r"(_addr)); \ } #else #define LOAD_32LE(DEST, ADDR, ARR) DEST = ((uint32_t*) ARR)[(ADDR) >> 2]