Hi Matt, On Mon, Jul 24, 2017 at 11:01:06AM +1000, Matt Brown wrote: > + for (i = 0; i < (64 / size); i++) {
If you do for (i = 0; i < 64; i += size) things are slightly nicer. > + if ((i * size) < 32) > + low |= n << (i * size); > + else > + high |= n << ((i * size) - 32); > + } > + regs->gpr[ra] = (high << 32) | low; Why have separate high and low vars? And there are much better ways to calculate popcount, of course. Segher