From 05098cf70b668b9eac91db71c5bd44765ee1e6d5 Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Tue, 2 Apr 2019 14:55:13 +0800 Subject: add taint map --- src/cpu/o3/regfile.cc | 5 +++++ src/cpu/o3/regfile.hh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/cpu/o3/regfile.cc b/src/cpu/o3/regfile.cc index 2f41e2ac2..b3f1b1904 100644 --- a/src/cpu/o3/regfile.cc +++ b/src/cpu/o3/regfile.cc @@ -83,12 +83,14 @@ PhysRegFile::PhysRegFile(unsigned _numPhysicalIntRegs, // The initial batch of registers are the integer ones for (phys_reg = 0; phys_reg < numPhysicalIntRegs; phys_reg++) { intRegIds.emplace_back(IntRegClass, phys_reg, flat_reg_idx++); + intTaintMap.push_back(false); } // The next batch of the registers are the floating-point physical // registers; put them onto the floating-point free list. for (phys_reg = 0; phys_reg < numPhysicalFloatRegs; phys_reg++) { floatRegIds.emplace_back(FloatRegClass, phys_reg, flat_reg_idx++); + floatTaintMap.push_back(false); } // The next batch of the registers are the vector physical @@ -96,6 +98,7 @@ PhysRegFile::PhysRegFile(unsigned _numPhysicalIntRegs, for (phys_reg = 0; phys_reg < numPhysicalVecRegs; phys_reg++) { vectorRegFile[phys_reg].zero(); vecRegIds.emplace_back(VecRegClass, phys_reg, flat_reg_idx++); + vecTaintMap.push_back(false); } // The next batch of the registers are the vector element physical // registers; they refer to the same containers as the vector @@ -112,11 +115,13 @@ PhysRegFile::PhysRegFile(unsigned _numPhysicalIntRegs, // registers; put them onto the condition-code free list. for (phys_reg = 0; phys_reg < numPhysicalCCRegs; phys_reg++) { ccRegIds.emplace_back(CCRegClass, phys_reg, flat_reg_idx++); + ccTaintMap.push_back(false); } // Misc regs have a fixed mapping but still need PhysRegIds. for (phys_reg = 0; phys_reg < TheISA::NumMiscRegs; phys_reg++) { miscRegIds.emplace_back(MiscRegClass, phys_reg, 0); + miscTaintMap.push_back(false); } } diff --git a/src/cpu/o3/regfile.hh b/src/cpu/o3/regfile.hh index 7feec933f..943df35b9 100644 --- a/src/cpu/o3/regfile.hh +++ b/src/cpu/o3/regfile.hh @@ -87,22 +87,27 @@ class PhysRegFile /** Integer register file. */ std::vector intRegFile; std::vector intRegIds; + std::vector intTaintMap; /** Floating point register file. */ std::vector floatRegFile; std::vector floatRegIds; + std::vector floatTaintMap; /** Vector register file. */ std::vector vectorRegFile; std::vector vecRegIds; std::vector vecElemIds; + std::vector vecTaintMap; /** Condition-code register file. */ std::vector ccRegFile; std::vector ccRegIds; + std::vector ccTaintMap; /** Misc Reg Ids */ std::vector miscRegIds; + std::vector miscTaintMap; /** * Number of physical general purpose registers -- cgit v1.2.3