arch-arm: Fix SCR.NS compare to 0
authorJordi Vaquero <jordi.vaquero@metempsy.com>
Tue, 23 Jun 2020 09:29:13 +0000 (11:29 +0200)
committerJordi Vaquero <jordi.vaquero@metempsy.com>
Fri, 26 Jun 2020 07:01:06 +0000 (07:01 +0000)
Change-Id: Iba7628640bb222fd21fd067ff60dbe4d34f4b196
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30614
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>

src/arch/arm/insts/static_inst.hh

index 82bf61d0fb5645a7af004772fba5a588e41a6ba0..8610f996fd0f5e3bac9a8c457170b91d7bc30aeb 100644 (file)
@@ -257,7 +257,7 @@ class ArmStaticInst : public StaticInst
                         validModeChange = false;
                     // There is no Hyp mode ('11010') in Secure state, so that
                     // is UNPREDICTABLE
-                    if (scr.ns == '0' && newMode == MODE_HYP)
+                    if (scr.ns == 0 && newMode == MODE_HYP)
                         validModeChange = false;
                     // Cannot move into Hyp mode directly from a Non-secure
                     // PL1 mode