mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-12-26 23:52:48 +03:00
[refinement] Enable PPC testing.
This commit is contained in:
parent
3eeaed08a2
commit
290e33279a
@ -54,7 +54,11 @@ library
|
||||
, lens
|
||||
, macaw-base
|
||||
, macaw-loader
|
||||
, macaw-loader-ppc
|
||||
, macaw-loader-x86
|
||||
, macaw-ppc
|
||||
, macaw-symbolic
|
||||
, macaw-ppc-symbolic
|
||||
, mtl
|
||||
, parameterized-utils
|
||||
, prettyprinter
|
||||
@ -92,6 +96,7 @@ executable run-refinement
|
||||
, macaw-loader-x86
|
||||
, macaw-loader-ppc
|
||||
, macaw-ppc
|
||||
, macaw-ppc-symbolic
|
||||
, macaw-refinement
|
||||
, macaw-symbolic
|
||||
, macaw-x86
|
||||
@ -124,6 +129,7 @@ test-suite test-refinements
|
||||
, macaw-loader-x86
|
||||
, macaw-loader-ppc
|
||||
, macaw-ppc
|
||||
, macaw-ppc-symbolic
|
||||
, macaw-refinement
|
||||
, macaw-symbolic
|
||||
, macaw-x86
|
||||
|
@ -55,7 +55,8 @@ import Data.Macaw.BinaryLoader.X86 ()
|
||||
import Data.Macaw.CFG as MC
|
||||
import qualified Data.Macaw.Discovery as MD
|
||||
import qualified Data.Macaw.Memory.ElfLoader as ML
|
||||
-- import Data.Macaw.PPC
|
||||
import Data.Macaw.PPC
|
||||
import Data.Macaw.PPC.Symbolic ()
|
||||
import Data.Macaw.Refinement
|
||||
import qualified Data.Macaw.Symbolic as MS
|
||||
import qualified Data.Macaw.X86 as MX86
|
||||
@ -69,8 +70,8 @@ import qualified Data.Set as Set
|
||||
import Data.Tagged
|
||||
import Data.Typeable ( Typeable )
|
||||
import Options.Applicative
|
||||
-- import qualified SemMC.Architecture.PPC32 as PPC32
|
||||
-- import qualified SemMC.Architecture.PPC64 as PPC64
|
||||
import qualified SemMC.Architecture.PPC32 as PPC32
|
||||
import qualified SemMC.Architecture.PPC64 as PPC64
|
||||
import System.Directory ( doesFileExist )
|
||||
import System.FilePath ( (</>), (<.>) )
|
||||
import qualified System.FilePath as FP
|
||||
@ -251,20 +252,20 @@ testExpected useRefinement expFile testinp beVerbose readBinary = do
|
||||
where
|
||||
withElf64 elf =
|
||||
case E.elfMachine elf of
|
||||
-- E.EM_PPC64 -> do
|
||||
-- bin <- MBL.loadBinary @PPC64.PPC ML.defaultLoadOptions elf
|
||||
-- let pli = ppc64_linux_info bin
|
||||
-- withBinaryDiscoveredInfo testinp useRefinement expFile pli bin
|
||||
E.EM_PPC64 -> do
|
||||
bin <- MBL.loadBinary @PPC64.PPC ML.defaultLoadOptions elf
|
||||
let pli = ppc64_linux_info bin
|
||||
withBinaryDiscoveredInfo testinp useRefinement expFile pli bin
|
||||
E.EM_X86_64 ->
|
||||
withBinaryDiscoveredInfo testinp useRefinement expFile MX86.x86_64_linux_info =<<
|
||||
MBL.loadBinary @MX86.X86_64 ML.defaultLoadOptions elf
|
||||
m -> error $ "no 64-bit ELF support for " ++ show m
|
||||
withElf32 elf =
|
||||
case E.elfMachine elf of
|
||||
-- E.EM_PPC -> do
|
||||
-- bin <- MBL.loadBinary @PPC32.PPC ML.defaultLoadOptions elf
|
||||
-- let pli = ppc32_linux_info bin
|
||||
-- withBinaryDiscoveredInfo testinp useRefinement expFile pli bin
|
||||
E.EM_PPC -> do
|
||||
bin <- MBL.loadBinary @PPC32.PPC ML.defaultLoadOptions elf
|
||||
let pli = ppc32_linux_info bin
|
||||
withBinaryDiscoveredInfo testinp useRefinement expFile pli bin
|
||||
m -> error $ "no 32-bit ELF support for " ++ show m
|
||||
|
||||
withBinaryDiscoveredInfo :: ( X.MonadThrow m
|
||||
|
@ -21,6 +21,7 @@ import Data.Macaw.CFG ( ArchAddrWidth )
|
||||
import qualified Data.Macaw.Discovery as MD
|
||||
import qualified Data.Macaw.Memory.ElfLoader as ML
|
||||
import Data.Macaw.PPC
|
||||
import Data.Macaw.PPC.Symbolic ()
|
||||
import qualified Data.Macaw.Refinement as MR
|
||||
import Data.Macaw.Symbolic ( SymArchConstraints )
|
||||
import qualified Data.Macaw.X86 as MX86
|
||||
|
Loading…
Reference in New Issue
Block a user