arch-arm: Make hlt64 a mem barrier with semihosting
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 15 Feb 2018 09:55:20 +0000 (09:55 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 20 Feb 2018 13:30:02 +0000 (13:30 +0000)
The HLT instruction is used to trap into semihosting. The semihosting
code can change the contents of memory behind the back of the CPU,
which requires instructions triggering semihosting to be
non-speculative and memory barriers.

Change-Id: I735166251aa194120ad49c08082d4ac65fe96524
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/8373
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/arch/arm/isa/insts/misc64.isa

index 17d8df10d4131f9aba720d0405ed1df05a7fb0bf..2621905c7fafe07f042dd159f0f8864e7b151bb4 100644 (file)
@@ -191,6 +191,6 @@ let {{
     hltIop = InstObjParams("hlt", "Hlt64", "ImmOp64",
                            hltCode, ["IsNonSpeculative"])
     header_output += ImmOp64Declare.subst(hltIop)
-    decoder_output += ImmOp64Constructor.subst(hltIop)
+    decoder_output += SemihostConstructor64.subst(hltIop)
     exec_output += BasicExecute.subst(hltIop)
 }};