mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-12-28 08:34:23 +03:00
Add support for forcing allocation of fresh bits (as opposed to pointer/bits)
This commit is contained in:
parent
cf34388d41
commit
79a4cdf39e
@ -350,13 +350,13 @@ freshValue ::
|
||||
(IsSymInterface sym, 1 <= ptrW) =>
|
||||
sym ->
|
||||
String {- ^ Name for fresh value -} ->
|
||||
NatRepr ptrW {- ^ Width of pointers -} ->
|
||||
Maybe (NatRepr ptrW) {- ^ Width of pointers; if nothing, allocate as bits -} ->
|
||||
M.TypeRepr tp {- ^ Type of value -} ->
|
||||
IO (C.RegValue sym (ToCrucibleType tp))
|
||||
freshValue sym str w ty =
|
||||
case ty of
|
||||
M.BVTypeRepr y ->
|
||||
case testEquality y w of
|
||||
case testEquality y =<< w of
|
||||
|
||||
Just Refl ->
|
||||
do nm_base <- symName (str ++ "_base")
|
||||
|
@ -171,7 +171,7 @@ updateX86Reg r upd asgn =
|
||||
freshX86Reg :: C.IsSymInterface sym =>
|
||||
sym -> M.X86Reg t -> IO (RegValue' sym (ToCrucibleType t))
|
||||
freshX86Reg sym r =
|
||||
RV <$> freshValue sym (show r) (C.knownNat @64) (M.typeRepr r)
|
||||
RV <$> freshValue sym (show r) (Just (C.knownNat @64)) (M.typeRepr r)
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user