diff options
author | Iru Cai <mytbk920423@gmail.com> | 2019-04-08 10:42:39 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2019-04-08 10:42:39 +0800 |
commit | b6141109804bf4637345d5b8079c9a6debee285c (patch) | |
tree | 95d82200a859dfdffba48100854818380065666c /src/cpu/base_dyn_inst.hh | |
parent | f76b874533045543e56a69c1b5d75b34fbc8a888 (diff) | |
download | gem5-b6141109804bf4637345d5b8079c9a6debee285c.tar.xz |
implement taint propagation
Diffstat (limited to 'src/cpu/base_dyn_inst.hh')
-rw-r--r-- | src/cpu/base_dyn_inst.hh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cpu/base_dyn_inst.hh b/src/cpu/base_dyn_inst.hh index 756a5aa9f..d533ad9bf 100644 --- a/src/cpu/base_dyn_inst.hh +++ b/src/cpu/base_dyn_inst.hh @@ -478,11 +478,15 @@ class BaseDynInst : public ExecContext, public RefCounted _prevDestRegIdx[idx] = previous_rename; } - void taintDestRegs(void) + void taintDestRegs(bool istaint) { for (size_t i = 0; i < numDestRegs(); i++) { auto dstreg = _destRegIdx[i]; - cpu->setTaint(dstreg); + if (istaint) { + cpu->setTaint(dstreg); + } else { + cpu->clearTaint(dstreg); + } } } |