mirror of https://github.com/mgba-emu/mgba.git
Use GCC popcount intrinsic for popcount
This commit is contained in:
parent
537480b940
commit
9abe700d37
|
@ -571,11 +571,7 @@ uint32_t GBALoadMultiple(struct ARMCore* cpu, uint32_t address, int mask, enum L
|
|||
int popcount = 0;
|
||||
if (direction & LSM_D) {
|
||||
offset = -4;
|
||||
for (i = 0; i < 16; ++i) {
|
||||
if (mask & (1 << i)) {
|
||||
++popcount;
|
||||
}
|
||||
}
|
||||
popcount = __builtin_popcount(mask);
|
||||
address -= (popcount << 2) - 4;
|
||||
}
|
||||
|
||||
|
@ -678,11 +674,7 @@ uint32_t GBAStoreMultiple(struct ARMCore* cpu, uint32_t address, int mask, enum
|
|||
int popcount = 0;
|
||||
if (direction & LSM_D) {
|
||||
offset = -4;
|
||||
for (i = 0; i < 16; ++i) {
|
||||
if (mask & (1 << i)) {
|
||||
++popcount;
|
||||
}
|
||||
}
|
||||
popcount = __builtin_popcount(mask);
|
||||
address -= (popcount << 2) - 4;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue