x86-syntax: Use upstream register indices

This commit is contained in:
Langston Barrett 2024-08-15 16:13:23 -04:00
parent 97751b0895
commit 69f63302f8
2 changed files with 1 additions and 7 deletions

View File

@ -95,7 +95,6 @@ library
base >= 4.13,
containers,
crucible,
crucible-llvm,
crucible-syntax,
macaw-base,
macaw-symbolic,

View File

@ -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