From b6141109804bf4637345d5b8079c9a6debee285c Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Mon, 8 Apr 2019 10:42:39 +0800 Subject: implement taint propagation --- src/cpu/base_dyn_inst.hh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/cpu/base_dyn_inst.hh') 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); + } } } -- cgit v1.2.3