changeset 2f84b98634ff in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=2f84b98634ff
description:
X86: Ensure that the decoder's internal ExtMachInst is completely
initialized.
There are some bits of some fields of the ExtMachInst which are not
actually
used for anything but are included in the hash of an ExtMachInst for
simplicity and efficiency. This change makes sure the decoder's internal
working ExtMachInst is completely initialized, even these unused bits,
so that
there isn't any nondeterministic behavior, no valgrind messages about
uninitialized variables, and no potential false misses/redundant
entries in
the decode cache.
diffstat:
src/arch/x86/decoder.hh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r 6385cf85bf12 -r 2f84b98634ff src/arch/x86/decoder.hh
--- a/src/arch/x86/decoder.hh Thu May 31 13:30:04 2012 -0400
+++ b/src/arch/x86/decoder.hh Mon Jun 04 10:43:08 2012 -0700
@@ -159,6 +159,7 @@
outOfBytes(true), instDone(false),
state(ResetState)
{
+ memset(&emi, 0, sizeof(emi));
emi.mode.mode = LongMode;
emi.mode.submode = SixtyFourBitMode;
m5Reg = 0;
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev