all repos — mgba @ 56a105e3dade99b819352f514873c96487c2a06f

mGBA Game Boy Advance Emulator

Fix addresses being truncated
Jeffrey Pfau jeffrey@endrift.com
Wed, 01 Oct 2014 03:23:16 -0700
commit

56a105e3dade99b819352f514873c96487c2a06f

parent

14b6393b51a3e8ea38e83d2bef8c30db7d83cae2

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

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

@@ -23,7 +23,7 @@ asm("lwbrx %0, %1, %2" : "=r"(DEST) : "r"(_tmp), "p"(ARR)); \

} #define LOAD_16(DEST, ADDR, ARR) { \ - uint16_t _tmp = (ADDR); \ + uint32_t _tmp = (ADDR); \ asm("lhbrx %0, %1, %2" : "=r"(DEST) : "r"(_tmp), "p"(ARR)); \ }

@@ -33,7 +33,7 @@ asm("stwbrx %0, %1, %2" : : "r"(SRC), "r"(_tmp), "p"(ARR)); \

} #define STORE_16(SRC, ADDR, ARR) { \ - uint16_t _tmp = (ADDR); \ + uint32_t _tmp = (ADDR); \ asm("sthbrx %0, %1, %2" : : "r"(SRC), "r"(_tmp), "p"(ARR)); \ } #else