crucible-llvm-0.7.1: Support for translating and executing LLVM code in Crucible
Copyright(c) Galois Inc 2024
LicenseBSD3
MaintainerLangston Barrett <langston@galois.com>
Stabilityprovisional
Safe HaskellSafe-Inferred
LanguageHaskell2010

Lang.Crucible.LLVM.Intrinsics.Cast

Description

The built-in overrides in Lang.Crucible.LLVM.Intrinsics.Libc and Lang.Crucible.LLVM.Intrinsics.LLVM frequently take arguments of type BVType, but at runtime everything is represented as an LLVMPtr. This module contains helpers for "casting" between pointers and bitvectors.

Synopsis

Documentation

printValCastError :: ValCastError -> [String] Source #

Turn a ValCastError into a human-readable message (lines).

data ArgCast p sym ext args args' Source #

A function to (infallibly) cast between Assignments of RegEntrys.

data ValCast p sym ext tp tp' Source #

A function to (infallibly) cast a value of types tp to tp'.

castLLVMArgs Source #

Arguments

:: forall p sym ext bak args args'. IsSymBackend sym bak 
=> FunctionName

Only used in error messages

-> bak 
-> CtxRepr args' 
-> CtxRepr args 
-> Either ValCastError (ArgCast p sym ext args args') 

Attempt to construct a function to cast between Assignments of RegEntrys.

castLLVMRet Source #

Arguments

:: IsSymBackend sym bak 
=> FunctionName

Only used in error messages

-> bak 
-> TypeRepr ret 
-> TypeRepr ret' 
-> Either ValCastError (ValCast p sym ext ret ret') 

Attempt to construct a function to cast values of type ret to type ret'.