From 87eb9a3a640875d176bec9dfb130450d23d8e8b8 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 20 Dec 2017 00:02:47 -0800 Subject: riscv,x86: Stop using the arch Nop machine instruction unnecessarily. That particular ExtMachInst is a convenient placeholder, but a value of 0 in RISCV or a static uninitialized ExtMachInst (which will therefore be all zeroes) on x86 works just as well, and removes the need for an ISA specific constant. Also, the idea of a universal Nop doesn't always make sense since it could be that what, exactly, doesn't do anything depends on context which would be lost on a constant value of an ExtMachInst. For instance, the value of an ExtMachInst that makes sense might depend on what mode the CPU was in, etc. Change-Id: I1f1a43a5c607a667e11b79bcf6e059e4f7141b3f Reviewed-on: https://gem5-review.googlesource.com/6825 Reviewed-by: Gabe Black Reviewed-by: Alec Roelke Maintainer: Gabe Black --- src/arch/riscv/decoder.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/arch/riscv') diff --git a/src/arch/riscv/decoder.cc b/src/arch/riscv/decoder.cc index 020c5e34e..41a52020e 100644 --- a/src/arch/riscv/decoder.cc +++ b/src/arch/riscv/decoder.cc @@ -45,7 +45,7 @@ void Decoder::reset() aligned = true; mid = false; more = true; - emi = NoopMachInst; + emi = 0; instDone = false; } -- cgit v1.2.3