o3 cpu: fix zero reg problem

There was an issue w/ the rename logic, which would assign a previous physical
register to the ZeroReg architectural register in x86.  This issue was giving
problems for instructions squashed in threads w/ ID different from 0,
sometimes allowing non-mispredicted instructions to obtain a value different
from zero when reading the zeroReg.
This commit is contained in:
Andrea Pellegrini 2013-01-22 00:13:28 -06:00
parent fc57ae6401
commit 11d5ffa108

View file

@ -158,6 +158,7 @@ SimpleRenameMap::rename(RegIndex arch_reg)
} else { } else {
// Otherwise return the zero register so nothing bad happens. // Otherwise return the zero register so nothing bad happens.
renamed_reg = intZeroReg; renamed_reg = intZeroReg;
prev_reg = intZeroReg;
} }
} else if (arch_reg < numLogicalRegs) { } else if (arch_reg < numLogicalRegs) {
// Record the current physical register that is renamed to the // Record the current physical register that is renamed to the