cpu-o3: Mark getWritableRegOperand() in O3CPU as a regwrite (#360)

As discussed here, [1], O3CPU counts getWritableRegOperand() as a reg
read, while SimpleCPU variants count getWriableRegOperand() as a reg
write.

This patch fixes this inconsistency. Here, I assume that if
getWritableRegOperand() is used, setReg() will not be used again to
write to the destination register.

[1] https://github.com/gem5/gem5/pull/341
This commit is contained in:
Bobby R. Bruce
2023-09-27 14:31:38 -07:00
committed by GitHub

View File

@@ -989,10 +989,10 @@ CPU::getWritableReg(PhysRegIdPtr phys_reg, ThreadID tid)
{
switch (phys_reg->classValue()) {
case VecRegClass:
executeStats[tid]->numVecRegReads++;
executeStats[tid]->numVecRegWrites++;
break;
case VecPredRegClass:
executeStats[tid]->numVecPredRegReads++;
executeStats[tid]->numVecPredRegWrites++;
break;
default:
break;