target-arm: Don't decode old cp15 WFI instructions on v7 cores
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 25 Feb 2011 15:04:12 +0000 (15:04 +0000)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 6 Mar 2011 19:20:19 +0000 (20:20 +0100)
commit4dfe575a12885642d001da6992f91f2c32ba8a9f
treea89d9319c9bdc44df541f73da3a388eebdc1717f
parentf2717514ea52c13c5af73da36a512920f7bc1382
target-arm: Don't decode old cp15 WFI instructions on v7 cores

In v7 of the ARM architecture, WFI (wait for interrupt) is a first-class
instruction, but in previous versions this functionality was provided
via a cp15 coprocessor register. Add correct feature checks to the
decoding of the cp15 WFI instructions so that they behave correctly
for newer cores. In particular, the old 0,c7,c8,2 encoding used on
ARM940 has been reused for VA-to-PA translation in v6 and v7.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm/translate.c