mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-11-23 08:27:24 +03:00
Start on writeMem
This commit is contained in:
parent
1c07b88ae7
commit
b57483b1f8
@ -292,7 +292,7 @@ execMacawStmtExtension archStmtFn s0 st =
|
||||
case s0 of
|
||||
MacawReadMem mvar w mr x -> doReadMem st mvar w mr x
|
||||
MacawCondReadMem mvar w mr p x d -> doCondReadMem st mvar w mr p x d
|
||||
MacawWriteMem{} -> undefined
|
||||
MacawWriteMem mvar w mr x v -> doWriteMem st mvar w mr x v
|
||||
MacawFreshSymbolic{} -> undefined
|
||||
MacawCall{} -> undefined
|
||||
MacawArchStmtExtension s -> archStmtFn s st
|
||||
|
Binary file not shown.
@ -18,6 +18,7 @@ module Data.Macaw.Symbolic.MemOps
|
||||
, doPtrLeq
|
||||
, doReadMem
|
||||
, doCondReadMem
|
||||
, doWriteMem
|
||||
) where
|
||||
|
||||
import Control.Lens((^.))
|
||||
@ -226,6 +227,18 @@ doCondReadMem st mvar w (BVMemRepr bytes endian) cond0 ptr def0 =
|
||||
|
||||
return (a,st)
|
||||
|
||||
doWriteMem ::
|
||||
(IsSymInterface sym, 16 <= ptrW) =>
|
||||
CrucibleState s sym ext rtp blocks r ctx {- ^ Simulator state -} ->
|
||||
GlobalVar Mem -> {- ^ Memory model -}
|
||||
NatRepr ptrW {- ^ Width of ptr -} ->
|
||||
MemRepr ty {- ^ What/how we are reading -} ->
|
||||
RegEntry sym (LLVMPointerType ptrW) {- ^ Pointer -} ->
|
||||
RegEntry sym (ToCrucibleType ty) {- ^ Write this value -} ->
|
||||
IO ( RegValue sym UnitType
|
||||
, CrucibleState s sym ext rtp blocks r ctx
|
||||
)
|
||||
doWriteMem = undefined
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user