diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/base_dyn_inst.hh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cpu/base_dyn_inst.hh b/src/cpu/base_dyn_inst.hh index 3ecec0f0c..6ea00dd3d 100644 --- a/src/cpu/base_dyn_inst.hh +++ b/src/cpu/base_dyn_inst.hh @@ -899,6 +899,12 @@ BaseDynInst<Impl>::readBytes(Addr addr, uint8_t *data, this->setExecuted(); } + if (fault != NoFault) { + // Return a fixed value to keep simulation deterministic even + // along misspeculated paths. + bzero(data, size); + } + if (traceData) { traceData->setAddr(addr); } @@ -913,11 +919,6 @@ BaseDynInst<Impl>::read(Addr addr, T &data, unsigned flags) { Fault fault = readBytes(addr, (uint8_t *)&data, sizeof(T), flags); - if (fault != NoFault) { - // Return a fixed value to keep simulation deterministic even - // along misspeculated paths. - data = (T)-1; - } data = TheISA::gtoh(data); if (traceData) { |