qemu-e2k/hw/misc
Radim Krčmář c6dc3dd72b milkymist-pfpu: fix GCC 5.0.0 aggressive-loop-optimizations warning
man gcc:
  Warn if in a loop with constant number of iterations the compiler
  detects undefined behavior in some statement during one or more of
  the iterations.

Milkymist pfpu has no jump instructions, so checking for MICROCODE_WORDS
instructions should have kept us in bounds of s->microcode, but i++
allowed one loop too many,

  hw/misc/milkymist-pfpu.c: In function ‘pfpu_write’:
  hw/misc/milkymist-pfpu.c:365:20: error: loop exit may only be reached after undefined behavior [-Werror=aggressive-loop-optimizations]
                   if (i++ >= MICROCODE_WORDS) {
                      ^
  hw/misc/milkymist-pfpu.c:167:14: note: possible undefined statement is here
       uint32_t insn = s->microcode[pc];
                ^

The code can still access out of bounds, because it presumes that PC register
always begins at 0, and we allow writing to it.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Acked-by: Michael Walle <michael@walle.cc>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10 08:15:34 +03:00
..
macio macio: fix possible memory leak 2015-03-10 08:15:34 +03:00
a9scu.c
applesmc.c pc: export applesmc IO port/len 2015-03-01 12:33:22 +01:00
arm11scu.c
arm_integrator_debug.c
arm_l2x0.c
arm_sysctl.c
cbus.c hw: Fix qemu_allocate_irqs() leaks 2014-06-30 21:13:30 +02:00
debugexit.c
eccmemctl.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
edu.c hw: misc, add educational driver 2015-01-26 12:26:55 +01:00
exynos4210_pmu.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
imx_ccm.c hw/misc/imx_ccm.c: Add missing VMState list terminator 2014-07-22 17:53:36 +01:00
ivshmem.c ivshmem: use error_report 2014-10-31 17:02:22 +01:00
Makefile.objs Give ivshmem its own config option 2015-02-27 15:17:46 +01:00
max111x.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
milkymist-hpdmc.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
milkymist-pfpu.c milkymist-pfpu: fix GCC 5.0.0 aggressive-loop-optimizations warning 2015-03-10 08:15:34 +03:00
mst_fpga.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
omap_clk.c
omap_gpmc.c omap_gpmc.c: Remove duplicate assignment 2014-10-24 12:19:12 +01:00
omap_l4.c
omap_sdrc.c
omap_tap.c
pc-testdev.c
pci-testdev.c pci: Trivial device model conversions to realize 2015-02-26 12:42:16 +01:00
puv3_pm.c
pvpanic.c qapi event: convert GUEST_PANICKED 2014-06-23 11:12:28 -04:00
sga.c
slavio_misc.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
tmp105.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
tmp105.h
vmport.c
zynq_slcr.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00