Commit Graph

1923 Commits

Author SHA1 Message Date
Daniel Matichuk
278d365a31 aarch32: simplify write action representation 2020-07-28 11:57:07 -07:00
Daniel Matichuk
f53ea84cd9 module import cleanup 2020-07-28 11:57:07 -07:00
Daniel Matichuk
6e54d1488b avoid redundant let-bindings 2020-07-28 11:57:07 -07:00
Daniel Matichuk
468c329fa1 use compilation-friendly boolean and bitvector ops 2020-07-28 11:57:07 -07:00
Daniel Matichuk
838ef3924d aarch32: wrap up stateful operations as values 2020-07-28 11:57:07 -07:00
Daniel Matichuk
3e03ec11ab allow for arch-specific type translation 2020-07-28 11:57:07 -07:00
Daniel Matichuk
dcd5339b5a allow for manual bind pattern 2020-07-28 11:57:07 -07:00
Daniel Matichuk
98a429b7e0 avoid using applicative binds for eager values 2020-07-28 11:57:07 -07:00
Daniel Matichuk
62dd08f5a1 add more cases for simplifying boolean Muxes 2020-07-28 11:57:07 -07:00
Sam Breese
547796118d x86: Add semantics for some AVX2 instructions (#149)
* x86: Add semantics for the vpsrld and vpsrlq instructions

* x86: Add semantics for vpaddq

* Fix Haddock for PointwiseLogicalShiftR

* x86: Change vpsubd to PtSub rather than PtAdd
2020-07-28 11:57:07 -07:00
Kevin Quick
0cb0a89748
Update submodules. 2020-07-20 14:18:35 -07:00
Kevin Quick
f695c4d4c1
[macaw-refinement] updates for app-refactor what4 changes. 2020-07-17 17:30:44 -07:00
Kevin Quick
5b93b1fa00
[macaw-semmc] updates for app-refactor what4 changes
See https://github.com/GaloisInc/what4/pull/55
2020-07-16 23:08:58 -07:00
Sam Breese
48737990f3
x86: Add semantics for some AVX2 instructions (#149)
* x86: Add semantics for the vpsrld and vpsrlq instructions

* x86: Add semantics for vpaddq

* Fix Haddock for PointwiseLogicalShiftR

* x86: Change vpsubd to PtSub rather than PtAdd
2020-07-14 14:41:16 -04:00
Kevin Quick
f9959ecc33
Merge pull request #150 from GaloisInc/submods_20200713
Update submodules per successful master HEADs build.
2020-07-13 13:03:19 -07:00
Kevin Quick
d675f5c97b
Update submodules per successful master HEADs build. 2020-07-13 09:29:17 -07:00
Tristan Ravitch
b160e480a7
x86: Add semantics for the endbr instructions (#147)
This change treats them as no-ops (which is what they do on all released
hardware).  We could represent them with arch extensions.  This has a supporting
change in flexdis86 (included as a submodule).
2020-06-25 13:43:15 -07:00
Ben Selfridge
039b8497fc
updates what4, crucible, etc. (#146)
* update to bv-sized branch of what4 and other things

* removed parameterized-utils submodule completely

* Updates submodules

* Fixes macaw-symbolic w.r.t. crucible-llvm changes

Co-authored-by: Ben Selfridge <ben@000548-benselfridge.local>
2020-06-16 16:49:55 -07:00
Tristan Ravitch
5ba28484f9
symbolic: Add some documentation on pointer operations (#145)
symbolic: Add some documentation on pointer operations

Their behavior is not entirely obvious, so hopefully this should be useful to
someone in the future.
2020-06-13 10:27:43 -07:00
Tristan Ravitch
7ec8df5e92
aarch32: Two bug fixes
* Fix block size accounting in the disassembler

The value in the early failure combinator is used as the *block size* in the
resulting macaw block.  The code was actually using the offset from the
beginning of the segment, which is wrong.  This produced very large blocks that
didn't reflect the results of code discovery and led to decode errors later in
the pipeline.

* Do not throw an error if concreteIte has a symbolic argument

The `concreteIte` combinator turns formula conditionals with concrete operands
into Haskell-level conditional execution.  It would fail because we believed
that there were no cases that could fail to satisfy that condition.  That
assumption was not true - we need to fall back to generating a mux when we have
a symbolic condition.
2020-06-11 15:28:23 -07:00
Kevin Quick
b82ca35564
Merge pull request #142 from GaloisInc/ghc_8_4
Update for GHC 8.4 type management.
2020-06-04 21:47:48 -07:00
Kevin Quick
2c23067318 Update submodules. 2020-06-03 21:37:37 -07:00
Kevin Quick
c625c2cf92
Update for GHC 8.4 type management.
Under GHC8.4, a let binding is independent of the surrounding context,
so the let statements encountered errors related to type matching on
synthesized internal type parameters that could not be identified as
the same due to rigid skolem type binding inside the let.
2020-06-02 11:35:40 -07:00
Sam Breese
02c6cc3cb5
Handle bitwise operations on stack offset abstract values (#136)
- Generalize handling of bitwise operations to also apply them to stack offsets
- Use the extended bitwise handling on AND
2020-05-28 14:04:06 -04:00
Tristan Ravitch
89fc5a73f7
Tr/full arm intrinsics (#137)
Improve the TH codegen for macaw-semmc

This change lazily translates as much as possible.  It also generates somewhat more compact code. This change also finishes implementing primitives for the aarch32 backend.  Complementing the aarch32 changes, the macaw-semmc interface has been modified to allow macaw-aarch32 to avoid a redundant serialize-deserialize round.

Co-authored-by: Kevin Quick <kquick@galois.com>
2020-05-26 09:24:45 -07:00
Kevin Quick
162d7f0c2c
Merge pull request #138 from GaloisInc/release_2_1_0
Update submodules for parameterized-utils release 2.1.0 compatibility.
2020-05-22 14:57:59 -07:00
Kevin Quick
e78c6ad8b5 Merge branch 'release_2_1_0' of github.com:galoisinc/macaw into release_2_1_0 2020-05-22 14:28:47 -07:00
Kevin Quick
ccda70607a
Remove stack files.
These are currently broken.  If someone is actively interested in
using stack to build then the files could be re-instated from this
position and updated, but it's better to not have them if they are not
used or maintained.
2020-05-22 14:27:49 -07:00
Kevin Quick
4a56736888
Merge branch 'master' into release_2_1_0 2020-05-22 01:31:23 -07:00
Kevin Quick
5c1ca99345
Add a project freeze file for GHC 8.8.3. 2020-05-22 00:06:50 -07:00
Kevin Quick
0f430d1b38
Update dependencies for GHC 8.4 support. 2020-05-21 23:42:41 -07:00
Kevin Quick
b941c1c5cb
No Werror in travis: it extends to all dependencies. 2020-05-21 14:48:53 -07:00
Kevin Quick
9de6ca502a
Misspelling in travis file. 2020-05-21 13:40:18 -07:00
Kevin Quick
dcc240936e
Update desired test targets for travis build. 2020-05-21 13:26:07 -07:00
Kevin Quick
9332d24d63
More travis updates. 2020-05-21 06:10:54 -07:00
Tristan Ravitch
e7cff66577
Fix a failure case in the macaw-ppc disassembler logic (#140)
This code was confusing what "offset" to pass to the `failAt` function.  Some
sites were passing the offset from the beginning of the block (correct), while
others passed the offset from the start of the segment (incorrect).  The
incorrect values were later used as block sizes, which caused some downstream
failures (in renovate).

This commit uniformly fails with the offset from the start of the block.
2020-05-20 23:36:53 -07:00
Kevin Quick
9741c075c4
Fix reference to cabal.project.dist in travis yaml file. 2020-05-20 20:37:47 -07:00
Kevin Quick
75da3580a8
Initial cabal-based travis configuration. 2020-05-19 16:20:42 -07:00
Kevin Quick
d8dbadf6a5
Add QuickCheck 2.4 to stack configurations for travis. 2020-05-18 15:19:24 -07:00
Kevin Quick
3e9ecbaa8e
Update submodules for parameterized-utils release 2.1.0 compatibility. 2020-05-17 22:49:37 -07:00
Kevin Quick
24899bc0d1
Merge pull request #135 from GaloisInc/aarch_bv_upd2
Update bv-sized package constraints.
2020-05-16 17:41:54 -07:00
Kevin Quick
aff97bec6a
Update bv-sized lower constraint to allow parameterized-utils 2.1.0. 2020-05-15 10:25:12 -07:00
Kevin Quick
5da67a8ec1
Update bv-sized package constraints. 2020-05-15 10:22:20 -07:00
Kevin Quick
bf4f9edc5c
Merge pull request #134 from GaloisInc/aarch32_bv_upd
[macaw-aarch32] Update for bv-sized API changes in version 1.0
2020-05-15 10:06:15 -07:00
Kevin Quick
3bee174f5f
[macaw-aarch32] Update for bv-sized API changes in version 1.0 2020-05-14 16:48:54 -07:00
Kevin Quick
d5defe04c2
Merge pull request #133 from GaloisInc/macaw_ppc_testfix
[macaw-ppc] Update test expectations for number of discovered blocks.
2020-05-14 11:22:06 -07:00
Kevin Quick
fb86f7acae
[macaw-ppc] Update test expectations for number of discovered blocks.
This change is probably due to the BitTrie modifications in
dismantle-tablegen.  It's not clear whether the older or newer number
of discovered blocks is correct; testing at this point is focused more
on getting roughly the correct order of magnitude rather than being
refined enough for high precision values.
2020-05-13 21:29:57 -07:00
Ben Selfridge
76868cf457
Fixed buggy rewrite rules involving testBit/shifts (#132)
* Fixed buggy rewrite rule involving testBit/shifts
2020-05-05 15:45:36 -07:00
brianhuffman
3a1396b500
Merge pull request #131 from GaloisInc/fix-warnings
Make code compile without warnings in ghc-8.6 and ghc-8.8.
2020-04-24 15:13:19 -07:00
Brian Huffman
f65c80d7b1 Make code compile without warnings in ghc-8.6 and ghc-8.8. 2020-04-23 20:22:30 -07:00