execute1: Fix interrupt delivery during slow instructions
authorPaul Mackerras <paulus@ozlabs.org>
Mon, 4 May 2020 05:17:04 +0000 (15:17 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Wed, 6 May 2020 22:07:01 +0000 (08:07 +1000)
commit102fbcfe9a3d8e054fdb0ad050512944051e4844
treeca7a833f04ad6e1159d883b433cf3e484d7e50b0
parentfe789190e40fe160d129f0504d1f69fec54cf4d9
execute1: Fix interrupt delivery during slow instructions

During slow instructions such as multiply or divide, if a decrementer
(or other asynchronous) interrupt becomes pending, it disrupts the
logic that keeps stall asserted until the end of the slow
instruction, and the interrupt logic starts trying to deliver the
interrupt before the slow instruction has finished.

To fix that, make the interrupt logic wait until it sees e_in.valid
set before setting exception to 1.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
execute1.vhdl