qemu-e2k/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
..
Makefile.objs netduino2: Add the Netduino 2 Machine 2015-03-11 13:21:06 +00:00
allwinner-a10.c hw: Mark device misusing nd_table[] FIXME 2015-04-02 15:30:32 +02:00
armv7m.c target_arm: Parameterise the irq lines for armv7m_init 2015-02-05 13:37:21 +00:00
boot.c Switch non-CPU callers from ld/st*_phys to address_space_ld/st* 2015-04-26 16:49:24 +01:00
collie.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
cubieboard.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
digic.c
digic_boards.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
exynos4_boards.c
exynos4210.c error: Use error_report_err() where appropriate 2015-02-18 10:51:09 +01:00
gumstix.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
highbank.c Switch non-CPU callers from ld/st*_phys to address_space_ld/st* 2015-04-26 16:49:24 +01:00
integratorcp.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
kzm.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
mainstone.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
musicpal.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
netduino2.c netduino2: Add the Netduino 2 Machine 2015-03-11 13:21:06 +00:00
nseries.c hw/arm/nseries: convert ffs(3) to ctz32() 2015-04-28 15:36:08 +02:00
omap1.c Convert ffs() != 0 callers to ctz32() 2015-04-28 15:36:08 +02:00
omap2.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
omap_sx1.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
palm.c
pxa2xx.c target-arm: rename c1_coproc to cpacr_el1 2015-04-26 16:49:25 +01:00
pxa2xx_gpio.c Convert (ffs(val) - 1) to ctz32(val) 2015-04-28 15:36:08 +02:00
pxa2xx_pic.c
realview.c error: Use error_report_err() where appropriate 2015-02-18 10:51:09 +01:00
spitz.c sysbus: Make devices picking up backends unavailable with -device 2015-04-02 15:30:44 +02:00
stellaris.c target_arm: Parameterise the irq lines for armv7m_init 2015-02-05 13:37:21 +00:00
stm32f205_soc.c stm32f205: Add the stm32f205 SoC 2015-03-11 13:21:06 +00:00
strongarm.c Convert (ffs(val) - 1) to ctz32(val) 2015-04-28 15:36:08 +02:00
strongarm.h
tosa.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
versatilepb.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
vexpress.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
virt.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
xilinx_zynq.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
z2.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00