summaryrefslogtreecommitdiff
path: root/src/cpu/o3/regfile.hh
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2019-04-03 10:29:37 +0800
committerIru Cai <mytbk920423@gmail.com>2019-04-03 10:55:39 +0800
commitf76b874533045543e56a69c1b5d75b34fbc8a888 (patch)
treec7f2948cf916ff938a713b6856cec789cb5f6982 /src/cpu/o3/regfile.hh
parentb28522528109f87d9420e59a31cef88a045ed0e6 (diff)
downloadgem5-f76b874533045543e56a69c1b5d75b34fbc8a888.tar.xz
check loads using tainted registers, set USL dst as tainted
Diffstat (limited to 'src/cpu/o3/regfile.hh')
-rw-r--r--src/cpu/o3/regfile.hh18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/cpu/o3/regfile.hh b/src/cpu/o3/regfile.hh
index 00b4ef045..4d54acc2f 100644
--- a/src/cpu/o3/regfile.hh
+++ b/src/cpu/o3/regfile.hh
@@ -199,10 +199,28 @@ class PhysRegFile
miscTaintMap[idx] = true;
break;
default:
+ warn_once("taint for vector registers not supported yet\n");
break;
}
}
+ bool regTainted(PhysRegIdPtr phys_reg) {
+ RegIndex idx = phys_reg->index();
+ switch (phys_reg->classValue()) {
+ case IntRegClass:
+ return intTaintMap[idx];
+ case FloatRegClass:
+ return floatTaintMap[idx];
+ case CCRegClass:
+ return ccTaintMap[idx];
+ case MiscRegClass:
+ return miscTaintMap[idx];
+ default:
+ warn_once("taint for vector registers not supported yet\n");
+ return false;
+ }
+ }
+
/** Reads an integer register. */
uint64_t readIntReg(PhysRegIdPtr phys_reg) const
{