mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-11-29 11:02:13 +03:00
x86-syntax: Use upstream register indices
This commit is contained in:
parent
97751b0895
commit
69f63302f8
@ -95,7 +95,6 @@ library
|
||||
base >= 4.13,
|
||||
containers,
|
||||
crucible,
|
||||
crucible-llvm,
|
||||
crucible-syntax,
|
||||
macaw-base,
|
||||
macaw-symbolic,
|
||||
|
@ -33,7 +33,6 @@ import Data.Parameterized.Some (Some(..))
|
||||
import Lang.Crucible.CFG.Expr as Expr
|
||||
import Lang.Crucible.CFG.Reg (Atom, Stmt)
|
||||
import Lang.Crucible.CFG.Reg qualified as Reg
|
||||
import Lang.Crucible.LLVM.MemModel.Pointer qualified as Mem
|
||||
import Lang.Crucible.Syntax.Atoms qualified as LCSA
|
||||
import Lang.Crucible.Syntax.Concrete qualified as LCSC
|
||||
import Lang.Crucible.Syntax.Monad qualified as LCSM
|
||||
@ -95,13 +94,9 @@ parseReg =
|
||||
LCSM.describe "an x86_64 register" $ do
|
||||
name <- LCSC.atomName
|
||||
case name of
|
||||
LCSA.AtomName "rip" ->
|
||||
pure (Some ripIndex)
|
||||
LCSA.AtomName "rip" -> pure (Some X86.ip)
|
||||
LCSA.AtomName _ -> empty
|
||||
|
||||
ripIndex :: Ctx.Index (DMS.MacawCrucibleRegTypes X86.X86_64) (Mem.LLVMPointerType 64)
|
||||
ripIndex = Ctx.extendIndex @(Ctx.EmptyCtx Ctx.::> Mem.LLVMPointerType 64) @(DMS.MacawCrucibleRegTypes X86.X86_64) Ctx.baseIndex
|
||||
|
||||
x86AtomParser ::
|
||||
( LCSM.MonadSyntax LCSA.Atomic m
|
||||
, MonadIO m
|
||||
|
Loading…
Reference in New Issue
Block a user