make sure to only read 1 src reg. for write-hint and any other similar
'store' instruction. Reading the source reg when its not necessary
can cause the simulator to read from uninitialized values
if ( inst->isLoad() ) {
M->needs(DCache, CacheUnit::InitiateReadData);
} else if ( inst->isStore() ) {
- M->needs(RegManager, UseDefUnit::ReadSrcReg, 1);
+ if ( inst->numSrcRegs() >= 2 ) {
+ M->needs(RegManager, UseDefUnit::ReadSrcReg, 1);
+ }
M->needs(AGEN, AGENUnit::GenerateAddr);
M->needs(DCache, CacheUnit::InitiateWriteData);
}