Peter Maydell 12fbf1a163 hw/intc/armv7m_nvic: Fix byte-to-interrupt number conversions
In many of the NVIC registers relating to interrupts, we
have to convert from a byte offset within a register set
into the number of the first interrupt which is affected.
We were getting this wrong for:
 * reads of NVIC_ISPR<n>, NVIC_ISER<n>, NVIC_ICPR<n>, NVIC_ICER<n>,
   NVIC_IABR<n> -- in all these cases we were missing the "* 8"
   needed to convert from the byte offset to the interrupt number
   (since all these registers use one bit per interrupt)
 * writes of NVIC_IPR<n> had the opposite problem of a spurious
   "* 8" (since these registers use one byte per interrupt)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180209165810.6668-9-peter.maydell@linaro.org
2018-02-15 18:29:49 +00:00
..
2017-09-27 11:35:59 +01:00
2016-05-19 16:42:29 +02:00
2016-06-07 18:19:23 +03:00
2016-05-19 16:42:29 +02:00
2016-01-29 15:07:24 +00:00
2016-05-19 16:42:29 +02:00
2017-09-27 11:35:59 +01:00
2017-11-14 14:31:33 +01:00
2017-12-18 17:07:03 +03:00
2017-12-15 09:49:24 +11:00
2016-05-19 16:42:29 +02:00
2016-01-29 15:07:22 +00:00
2017-12-15 09:49:24 +11:00
2016-01-29 15:07:24 +00:00