target-arm: Translate with condexec bits from TB flags, not CPUState
commit98eac7cab4392ab28fa22265e27906f5b9c6c9da
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 14 Jan 2011 19:39:19 +0000 (14 20:39 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 14 Jan 2011 19:39:19 +0000 (14 20:39 +0100)
tree8c5ad75dfd64b8ba4f345086b8ab54f16a09c7d9
parent7204ab889f1cf5b09026af22185525edbee07a97
target-arm: Translate with condexec bits from TB flags, not CPUState

When translating, the condexec bits for the TB are in the TB flags;
the CPUState condexec bits may be different.

This patch fixes https://bugs.launchpad.net/bugs/604872 where we might
segfault if we took an exception in the middle of a TB with an IT
block, because when we came to retranslate in cpu_restore_state()
the CPUState condexec bits would have advanced compared to the start
of the TB and we would generate different (wrong) code.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm/translate.c