mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-11-23 08:27:24 +03:00
macaw-symbolic: Consolidate duplicate definitions of toCrucibleEndian
There were two identical definitions of `toCrucibleEndian`, one in `D.M.S.Memory` and another in `D.M.S.Testing`. This commit removes the latter in favor of the former, which is actually exported.
This commit is contained in:
parent
c900dc4de8
commit
45f991ccdf
@ -174,7 +174,7 @@ data MemPtrTable sym w =
|
||||
-- ^ Pointer width representative
|
||||
}
|
||||
|
||||
-- | Convert a Macaw Endianness to a Crucible LLVM EndianForm
|
||||
-- | Convert a Macaw 'MC.Endianness' to a Crucible LLVM 'CLD.EndianForm'.
|
||||
toCrucibleEndian :: MC.Endianness -> CLD.EndianForm
|
||||
toCrucibleEndian MC.BigEndian = CLD.BigEndian
|
||||
toCrucibleEndian MC.LittleEndian = CLD.LittleEndian
|
||||
|
@ -233,7 +233,7 @@ simulateAndVerify goalSolver logger sym execFeatures archInfo archVals mem (Resu
|
||||
halloc <- CFH.newHandleAllocator
|
||||
CCC.SomeCFG g <- MS.mkFunCFG (MS.archFunctions archVals) halloc funName posFn dfi
|
||||
|
||||
let endianness = toCrucibleEndian (MAI.archEndianness archInfo)
|
||||
let endianness = MSM.toCrucibleEndian (MAI.archEndianness archInfo)
|
||||
let ?recordLLVMAnnotation = \_ _ _ -> return ()
|
||||
(initMem, memPtrTbl) <- MSM.newGlobalMemory (Proxy @arch) sym endianness MSM.ConcreteMutable mem
|
||||
let globalMap = MSM.mapRegionPointers memPtrTbl
|
||||
@ -402,10 +402,3 @@ lookupSyscall = MS.unsupportedSyscalls "macaw-symbolic-tests"
|
||||
-- parameter.
|
||||
validityCheck :: MS.MkGlobalPointerValidityAssertion sym w
|
||||
validityCheck _ _ _ _ = return Nothing
|
||||
|
||||
-- | Convert from macaw endianness to the LLVM memory model endianness
|
||||
toCrucibleEndian :: MEL.Endianness -> CLD.EndianForm
|
||||
toCrucibleEndian e =
|
||||
case e of
|
||||
MM.LittleEndian -> CLD.LittleEndian
|
||||
MM.BigEndian -> CLD.BigEndian
|
||||
|
Loading…
Reference in New Issue
Block a user