Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change handling of global variables #97

Merged
merged 4 commits into from
Oct 4, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change handling of global variables
Instead of providing a CFG that initializes all global variables,
the result of translating a module now contains a map from
symbols (the name of the global) to their initializers (represented
as a constant LLVM value).

Clients to this API (e.g. saw-script) can now initialize globals at
will by turning them into LLVM expressions.
langston-barrett committed Sep 27, 2018
commit 339e05db8d32aa36322d35e024e8a909c5c458d0
23 changes: 23 additions & 0 deletions crucible-llvm/crucible-llvm.cabal
Original file line number Diff line number Diff line change
@@ -61,7 +61,30 @@ library
Lang.Crucible.LLVM.MemModel.Value
Lang.Crucible.LLVM.MemModel.Pointer
Lang.Crucible.LLVM.MemModel.Type
Lang.Crucible.LLVM.Translation.Internal
Lang.Crucible.LLVM.Types

ghc-options: -Wall
ghc-prof-options: -O2 -fprof-auto-top


test-suite crucible-llvm-tests
type: exitcode-stdio-1.0
main-is: Tests.hs
hs-source-dirs: test
-- other-modules:
build-depends:
base,
containers,
crucible,
crucible-llvm,
directory,
filepath,
llvm-pretty,
llvm-pretty-bc-parser,
mtl,
parameterized-utils,
process,
tasty,
tasty-golden,
tasty-hunit
2 changes: 2 additions & 0 deletions crucible-llvm/src/Lang/Crucible/LLVM/MemModel/Value.hs
Original file line number Diff line number Diff line change
@@ -61,8 +61,10 @@ import What4.Partial

import Lang.Crucible.Backend
import qualified Lang.Crucible.LLVM.Bytes as G
import Lang.Crucible.LLVM.Extension (ArchWidth)
import qualified Lang.Crucible.LLVM.MemModel.Type as G
import Lang.Crucible.LLVM.MemModel.Pointer
import Lang.Crucible.LLVM.Translation.Constant

data FloatSize (fi :: FloatInfo) where
SingleSize :: FloatSize SingleFloat
Loading