Use cleaner mechanism for checking the register list bits

This commit is contained in:
Jeffrey Pfau 2014-10-22 22:01:48 -07:00
parent 1619b760e1
commit 043bb75a6b
1 changed files with 2 additions and 2 deletions

View File

@ -629,7 +629,7 @@ void GBAStore8(struct ARMCore* cpu, uint32_t address, int8_t value, int* cycleCo
#define LDM_LOOP_BEGIN \ #define LDM_LOOP_BEGIN \
for (i = 0; i < 16; ++i) { \ for (i = 0; i < 16; ++i) { \
if (~mask & (1 << i)) { \ if (!(mask & (1 << i))) { \
continue; \ continue; \
} }
@ -733,7 +733,7 @@ uint32_t GBALoadMultiple(struct ARMCore* cpu, uint32_t address, int mask, enum L
#define STM_LOOP_BEGIN \ #define STM_LOOP_BEGIN \
for (i = 0; i < 16; ++i) { \ for (i = 0; i < 16; ++i) { \
if (~mask & (1 << i)) { \ if (!(mask & (1 << i))) { \
continue; \ continue; \
} \ } \
value = cpu->gprs[i]; value = cpu->gprs[i];