From 1a2b9284f11eaa67420d29641afe3d32ae1418af Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Fri, 26 Jul 2024 15:03:53 -0400 Subject: [PATCH] macaw-{ppc,riscv}-symbolic: Move S definition above functions that use it --- macaw-ppc-symbolic/src/Data/Macaw/PPC/Symbolic/Functions.hs | 4 ++-- .../src/Data/Macaw/RISCV/Symbolic/Functions.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/macaw-ppc-symbolic/src/Data/Macaw/PPC/Symbolic/Functions.hs b/macaw-ppc-symbolic/src/Data/Macaw/PPC/Symbolic/Functions.hs index 0fe40390..c03fb5ac 100644 --- a/macaw-ppc-symbolic/src/Data/Macaw/PPC/Symbolic/Functions.hs +++ b/macaw-ppc-symbolic/src/Data/Macaw/PPC/Symbolic/Functions.hs @@ -62,6 +62,8 @@ data SemanticsError = NonUserSymbol String instance X.Exception SemanticsError +type S p v sym rtp bs r ctx = C.CrucibleState p sym (MS.MacawExt (SP.AnyPPC v)) rtp bs r ctx + termSemantics :: (C.IsSymInterface sym, 1 <= SP.AddrWidth v) => SymFuns sym -> MP.PPCTermStmt v ids @@ -409,5 +411,3 @@ withRounding withRounding bak r action = do r' <- toValBV bak r U.withRounding (C.backendGetSym bak) r' action - -type S p v sym rtp bs r ctx = C.CrucibleState p sym (MS.MacawExt (SP.AnyPPC v)) rtp bs r ctx diff --git a/macaw-riscv-symbolic/src/Data/Macaw/RISCV/Symbolic/Functions.hs b/macaw-riscv-symbolic/src/Data/Macaw/RISCV/Symbolic/Functions.hs index 230c7a61..563f2402 100644 --- a/macaw-riscv-symbolic/src/Data/Macaw/RISCV/Symbolic/Functions.hs +++ b/macaw-riscv-symbolic/src/Data/Macaw/RISCV/Symbolic/Functions.hs @@ -27,6 +27,8 @@ import qualified Data.Macaw.RISCV.Symbolic.Panic as RP data SymFuns sym = SymFuns +type S p rv sym rtp bs r ctx = C.CrucibleState p sym (MS.MacawExt (MR.RISCV rv)) rtp bs r ctx + funcSemantics :: SymFuns sym -> MR.RISCVPrimFn rv (RA.AtomWrapper f) mt -> S p rv sym rtp bs r ctx @@ -50,5 +52,3 @@ termSemantics :: SymFuns sym -> S p rv sym rtp bs r ctx -> IO (C.RegValue sym C.UnitType, S p rv sym rtp bs r ctx) termSemantics _fs term _s = case term of {} - -type S p rv sym rtp bs r ctx = C.CrucibleState p sym (MS.MacawExt (MR.RISCV rv)) rtp bs r ctx