From 13c202f966f72ca1ac1fff9e5127f7f4e43b6cd9 Mon Sep 17 00:00:00 2001 From: Tristan Ravitch Date: Thu, 29 Mar 2018 10:01:06 -0700 Subject: [PATCH] Add a comment to setRegVal --- macaw-semmc/src/Data/Macaw/SemMC/Generator.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macaw-semmc/src/Data/Macaw/SemMC/Generator.hs b/macaw-semmc/src/Data/Macaw/SemMC/Generator.hs index 6ae8829e..51d24484 100644 --- a/macaw-semmc/src/Data/Macaw/SemMC/Generator.hs +++ b/macaw-semmc/src/Data/Macaw/SemMC/Generator.hs @@ -162,6 +162,9 @@ blockState = lens _blockState (\s v -> s { _blockState = v }) curRegState :: Simple Lens (GenState arch ids s) (RegState (ArchReg arch) (Value arch ids)) curRegState = blockState . pBlockState +-- | Update the value of a machine register (in the 'Generator' state) with a +-- new macaw 'Value'. This function applies a simplifier ('simplifyValue') to +-- the value first, if possible. setRegVal :: (OrdF (ArchReg arch), MM.MemWidth (RegAddrWidth (ArchReg arch))) => ArchReg arch tp -> Value arch ids tp