Commit Graph

402 Commits

Author SHA1 Message Date
Kevin Quick
eaadb16047 Merge branch 'master' of github.com:GaloisInc/macaw-semmc 2018-05-15 09:23:52 -07:00
Kevin Quick
0c6578ffba Merge branch 'master' of gitlab-ext.galois.com:macaw/macaw-semmc 2018-05-15 09:22:44 -07:00
Ben Selfridge
157e6825a5 update latest crucible and semmc 2018-05-10 13:05:55 -07:00
Tristan Ravitch
fd3ab9145a ppc-symbolic: Generate term statements in the translation 2018-05-10 07:58:00 -04:00
Kevin Quick
dc79e6b636
[ppc-symbolic] Update Crucible IsSymInterface and simulator state. 2018-05-07 15:59:05 -07:00
Tristan Ravitch
7bab701643 ppc-symbolic: Implement semantics for the ppc-specific statements
Except for Attn, these are all no-ops since we don't have a concurrency model.
That could change later - we might want to model them as both failing and
succeeding in some cases (esp the transactional memory instructions).
2018-05-07 08:15:05 -07:00
Kevin Quick
1b401bbe94
[ppc-symbolic] Remove extraneous file. 2018-05-04 17:43:10 -07:00
Tristan Ravitch
78af7939b6 ppc-symbolic: Sketch out terminator handling and interpretation 2018-05-04 17:16:06 -07:00
Tristan Ravitch
df607d4044 ppc-symbolic: Translate macaw statements
Still need to translate terminal statements (esp. system call and trap)
2018-05-04 16:48:31 -07:00
Tristan Ravitch
6d7bb6f6e4 ppc-symbolic: Fill out the semantics for the arch-specific functions 2018-05-04 15:46:54 -07:00
Tristan Ravitch
6b3bf072cf ppc-symbolic: Add more descriptive failures 2018-05-04 10:16:46 -07:00
Tristan Ravitch
1c97ca1314 ppc-symbolic: Implement the function evaluators 2018-05-04 10:15:25 -07:00
Tristan Ravitch
05c01beec0 Re-export newSymFuns from the top-level module 2018-05-04 09:32:13 -07:00
Tristan Ravitch
c3ba017fcc Start macaw-ppc-symbolic 2018-05-03 16:41:33 -07:00
Tristan Ravitch
7d306f052d Export more details from macaw-ppc 2018-05-03 16:40:58 -07:00
Tristan Ravitch
6747f0ed44 Generalize the HasRepr instance for PPCPrimFn 2018-05-03 10:00:53 -07:00
Tristan Ravitch
05061a2140 Add a PrettyF instance for PPCReg 2018-05-03 09:46:46 -07:00
Tristan Ravitch
4bed676ca2 Update to the latest macaw 2018-04-24 10:55:07 -07:00
Tristan Ravitch
27b4eaf360 Merge branch 'master' of gitlab-ext.galois.com:macaw/macaw-semmc into HEAD 2018-04-10 10:27:44 -07:00
Tristan Ravitch
8f4865e106 Haddock fixes 2018-04-10 10:27:29 -07:00
Tristan Ravitch
1f10c1d36b arm: Update the tests to work with the latest macaw 2018-04-09 15:07:17 -07:00
Tristan Ravitch
7e129f1ce1 Update the macaw submodule
This completes handling of the new archstate statement
2018-04-02 09:18:46 -07:00
Tristan Ravitch
b7c3118070 Update the calls to asAtomicStateUpdate
The type of the instruction address changed
2018-03-30 10:52:58 -07:00
Tristan Ravitch
dd655680f7 arm: Use asAtomicStateUpdate to generate a new macaw metadata statement 2018-03-30 09:10:41 -07:00
Tristan Ravitch
b051143e53 arm: Remove unused imports 2018-03-30 09:10:31 -07:00
Tristan Ravitch
d7b0ad9862 arm: Update macaw-arm to compile with the latest macaw (and macaw-semmc) 2018-03-30 09:08:49 -07:00
Tristan Ravitch
51023263c4 Add macaw-arm (and semmc-arm) to the cabal.project file 2018-03-29 18:08:41 -07:00
Tristan Ravitch
76eb501d45 ppc: Improve the register pretty printer 2018-03-29 18:07:25 -07:00
Tristan Ravitch
f959773cbd Emit the new 'ArchState' macaw statement
This change is in the core generator monad and applied in the PowerPC backend.
This change includes some macaw updates (which required a new elf-edit version).
2018-03-29 18:06:26 -07:00
Tristan Ravitch
ebd52aa11c Remove some unused imports 2018-03-29 11:18:56 -07:00
Tristan Ravitch
13c202f966 Add a comment to setRegVal 2018-03-29 10:01:06 -07:00
Tristan Ravitch
1ebf0cabb7 Submodule updates
These updates include a new version of cabal required to build macaw-symbolic.
macaw-symbolic is also now added to the cabal.project file.
2018-03-29 09:57:17 -07:00
Tristan Ravitch
d00e1fc7c9 Update the macaw submodule 2018-03-28 17:00:57 -07:00
Tristan Ravitch
43babd43cf Add macaw-x86 to the cabal.project file 2018-03-28 17:00:38 -07:00
Tristan Ravitch
716092eef1 ppc: Improve the test suite
Now test to ensure that no blocks end in a classification failure (or a
disassembly failure).  Before, many blocks were not classified, which causes
problems downstream.  This required some changes in macaw core in two places:

1. The simplifier needed some additional rules to remove some redundant
   constructions that threw off the abstract interpretation of values.  This was
   particularly an issue while reading return values off of the stack in
   PowerPC.
2. Extending the abstract interpretation to be able to handle more operations (shiftl)
2018-03-28 16:59:12 -07:00
Tristan Ravitch
fdb00dec14 ppc: Initialize the stack pointer in the abstract state
PPC uses r1 for the stack pointer
2018-03-28 16:59:12 -07:00
Tristan Ravitch
d885de3a72 ppc: Implement identifyReturn
We need special treatment of the return, as the low two bits are cleared on
PowerPC, so we can't just rely on pattern matching against the ReturnAddr in the
IP register.
2018-03-28 16:59:12 -07:00
Tristan Ravitch
d3a97edb4b ppc: Implement identifyReturn 2018-03-27 18:19:36 -07:00
Kevin Quick
19abbf8620
Update macaw submodule reference. 2018-03-27 10:58:27 -07:00
Kevin Quick
c3f2d13092
[arm] Implement identifyReturn (not properly functional).
The Macaw Discovery now calls the identifyReturn to identify return
statements.  Supply this for ARM, but at present this simply
replicates the original inline code which does not properly detect ARM
return operations because the low bit(s) of the address are always
cleared when writing to the instruction pointer in ARM.
2018-03-27 10:52:50 -07:00
Kevin Quick
7d7656bbd7
[ppc] Replace deprecated asLiteralAddr with valueAsMemAddr. 2018-03-27 10:51:16 -07:00
Kevin Quick
5ec4b48e16
[ppc] Update identifyReturn to identify based on IP == LNK
The identifyReturn was previously unused because the Macaw Discovery
performed this test inline, but some architectures have different
semantics so the identifyReturn is now used by the Discovery process.
This implements the return discovery that should be sufficient for the
PPC.
2018-03-27 10:49:30 -07:00
Kevin Quick
74bd4e2e93 Merge branch 'master' of https://gitlab-ext.galois.com/macaw/macaw-semmc 2018-03-26 16:06:43 -07:00
Kevin Quick
9e0c325400
[arm] Fail disassembly if readInstruction returns 0 bytes consumed
Without this check this condition could cause the disassembly to
recurse until all system memory is exhausted.
2018-03-26 16:05:34 -07:00
Kevin Quick
80886bd73d
[arm] Add support for Thumb THINT uninterpreted function. 2018-03-26 16:04:34 -07:00
Tristan Ravitch
2d54ca1362 ppc: Fix some expected test output
Recent changes in macaw(-base) mean that we split blocks more aggressively.  The
old expected outputs were conservative - these new values are much more in line
with intuitive expectation (with more aggressive splitting of blocks and less
code duplication between blocks).
2018-03-23 15:14:54 -07:00
Kevin Quick
0e36353f63 Update dismantle submodule reference. 2018-03-15 17:41:28 -07:00
Kevin Quick
0069d3c907
[arm] Add ExtractValue for Maybe of Thumb LowGPR operand. 2018-03-11 10:54:33 -07:00
Kevin Quick
7d12033f0c Merge branch 'master' of https://gitlab-ext.galois.com/macaw/macaw-semmc 2018-03-11 10:54:24 -07:00
Kevin Quick
0942725e07 Update semmc submodule reference. 2018-03-11 10:54:10 -07:00