qemu/hw/arm
Stefan Hajnoczi bd2a88840e Convert ffs() != 0 callers to ctz32()
There are a number of ffs(3) callers that do roughly:

  bit = ffs(val);
  if (bit) {
      do_something(bit - 1);
  }

This pattern can be converted to ctz32() like this:

  zeroes = ctz32(val);
  if (zeroes != 32) {
      do_something(zeroes);
  }

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1427124571-28598-6-git-send-email-stefanha@redhat.com
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-04-28 15:36:08 +02:00
..
allwinner-a10.c
armv7m.c
boot.c
collie.c
cubieboard.c
digic_boards.c
digic.c
exynos4_boards.c
exynos4210.c
gumstix.c
highbank.c
integratorcp.c
kzm.c
mainstone.c
Makefile.objs
musicpal.c
netduino2.c
nseries.c
omap1.c Convert ffs() != 0 callers to ctz32() 2015-04-28 15:36:08 +02:00
omap2.c
omap_sx1.c
palm.c
pxa2xx_gpio.c
pxa2xx_pic.c
pxa2xx.c
realview.c
spitz.c
stellaris.c
stm32f205_soc.c
strongarm.c
strongarm.h
tosa.c
versatilepb.c
vexpress.c
virt.c
xilinx_zynq.c
z2.c