Skip to content

Commit

Permalink
crucible-llvm: Generalize LLVMOverride's ext parameter
Browse files Browse the repository at this point in the history
Previously, the `OverrideSim` action for an `LLVMOverride` was
assumed to have a fixed `ext` parameter, namely, `LLVM`. While this is
intuitively appealing, it turns out not to be necessary. This is because
there are only a few operations in the `OverrideSim` monad that make
essential use of the `ext` parameter, such as registering or calling a
CFG in the given language extension. These operations are unlikely to be
used when defining, e.g., overrides for libc functions.

The motivation for generalizing the parameter is to enable the reuse of
`LLVMOverride`s in other Crucible language extensions that make use
of the LLVM memory model, namely, Macaw.
  • Loading branch information
langston-barrett committed Mar 21, 2024
1 parent af9c127 commit dc1c325
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crucible-llvm/src/Lang/Crucible/LLVM/Intrinsics/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ data LLVMOverride p sym args ret =
, llvmOverride_args :: CtxRepr args -- ^ A representation of the argument types
, llvmOverride_ret :: TypeRepr ret -- ^ A representation of the return type
, llvmOverride_def ::
forall bak.
forall bak ext.
IsSymBackend sym bak =>
GlobalVar Mem ->
bak ->
Ctx.Assignment (RegEntry sym) args ->
forall rtp args' ret'.
OverrideSim p sym LLVM rtp args' ret' (RegValue sym ret)
OverrideSim p sym ext rtp args' ret' (RegValue sym ret)
-- ^ The implementation of the intrinsic in the simulator monad
-- (@OverrideSim@).
}
Expand Down

0 comments on commit dc1c325

Please sign in to comment.