Commit Graph

35 Commits

Author SHA1 Message Date
Tristan Ravitch
bf454fc190 ppc: Rename test modules
They are now not 64-bit specific, update names to reflect that
2022-06-09 13:07:30 -07:00
Tristan Ravitch
fa840a2152 Add tests for 32 bit PowerPC 2022-06-09 13:07:30 -07:00
Brian Huffman
2a620d41de Switch from ansi-wl-pprint to the prettyprinter package.
This patch relies on the following submodule updates:
- GaloisInc/what4#77
- GaloisInc/elf-edit#20
- GaloisInc/crucible#586
- GaloisInc/asl-translator#28

This patch updates the following packages:
- macaw-base
- macaw-symbolic
- macaw-x86
- macaw-x86-symbolic
- macaw-aarch32
- macaw-ppc
- macaw-semmc
- macaw-refinement
2020-12-02 11:38:19 -08:00
Daniel Matichuk
3765c5eaab remove 'constraints' dependency 2020-10-06 11:20:40 -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
Kevin Quick
f525351621
Handle conversions for Float Mux in macaw-ppc. 2019-07-11 13:55:01 -07:00
Kevin Quick
730f855c71
Update to use macaw-loader for uniform binary loading. 2018-10-29 15:51:42 -07:00
Tristan Ravitch
9664914923 Update the PowerPC tests to deal with the latest macaw-semmc changes
The new binary loading interface does manage to simplify things
2018-05-21 14:32:29 -07:00
Kevin Quick
f81f2437ee
Update for crucible reorganization and new what4 module. 2018-05-18 08:33:58 -07:00
Tristan Ravitch
27810cdbf3 Add a draft of a generic binary loading interface, simplify TOC handling on PPC
The generic binary loading interface is instantiated once for each
architecture/binary container pair.  This isn't great, but there is enough
custom work in each setting to justify it.

The binary loading interface isn't finished yet, and needs to learn some
additional operations to support relocation.  It already supports additional
information that is architecture specific and binary container format
specific (that operations will have to use on a per-format basis).

On the PowerPC side, the Table of Contents (TOC) is now architecture-specific
information constructed by the loader (currently from ELF binaries).  The new
TOC data type is in place to support this more easily (the old format was just a
function).
2018-05-17 16:03:04 -07:00
Tristan Ravitch
ef5150e2e1 ppc: Remove an unused module 2017-11-27 22:53:55 -08:00
Tristan Ravitch
7256fd597f Generalize the generator monad, the TH helper monad, and the simplifier
This code was mostly architecture independent already, so this commit moves it
to the macaw-semmc module so that it can be shared with the ARM backend.  I
still plan to move the main TH module with the SimpleBuilder to macaw
translation, but that requires a few other changes first.
2017-11-26 23:31:04 -08:00
Tristan Ravitch
2092a0fd01 Add a (currently failing) test for indirect call handling
The code pointer discovery in macaw can't handle this case because we never
write the code pointers into memory - we only read them.  We really need a way
to tell macaw about code pointers.

The easy workaround is to pull all of the function entry points out of the TOC
and just seed the macaw search with them, but it would be nice to be able to
identify them from first principles.
2017-11-14 19:00:01 -08:00
Tristan Ravitch
94b72b2c73 Improvements for the generated semantics transformers
This change now memoizes translations of SimpleBuilder expression fragments,
which allows us to restore the sharing in semantics formulas.  The generator
re-uses shared sub-expressions automatically now.  This generates less Haskell
code, yielding better code density and fewer terms constructed at run time.  It
also reduces compile times.

It seems to cut the size of the generated TH code by about half.  It also
generates less deeply-nested Haskell code, making the resulting TH splices human
readable.
2017-11-13 10:46:33 -08:00
Tristan Ravitch
9d750c944a Add a new type of test to PowerPC
It runs code discovery over a large-ish binary to test coverage.  We currently
fail due to unsupported instructions (expected).  This test will guide
priorities on implementing new semantics.
2017-11-09 17:18:20 -08:00
Tristan Ravitch
d5d1d87fd5 Split some shared helpers out of a test module 2017-11-09 10:43:41 -08:00
Tristan Ravitch
a9baec5d39 Port to the latest macaw
This makes the architecture-specific terminator statement handling actually work
2017-11-06 10:11:34 -08:00
Ben Selfridge
a7c7600a20 Removed unused functions from TH.hs and put them in a standalone module 2017-11-02 11:43:27 -07:00
Ben Selfridge
16839e30c1 Test runs, fails at identifyCall 2017-10-27 14:29:04 -07:00
Ben Selfridge
2a7213f416 Added a simple test, which fails. 2017-10-24 16:36:36 -07:00
Ben Selfridge
74b5d85beb Added test skeleton, rearranged some TH stuff 2017-10-18 14:27:29 -07:00
Tristan Ravitch
792eb1aaf9 [ppc] Add a helper for turning operands into bitvectors
The main function is 'extractValue', which takes an operand and returns a macaw
bitvector for it (in the PPCGenerator monad).

There are still some missing cases for the memory operands.
2017-10-16 15:11:16 -07:00
Tristan Ravitch
95361474ae Feed semantics to the genExecInstruction calls
These lists come from semmc and contain the bytestrings of the semantics files
for each opcode.

NOTE: The lists are currently empty (presumably due to bugs), but the logic for
moving data around and setting up a SimpleBuilder instance is at least right.
2017-10-06 16:58:53 -07:00
Ben Selfridge
5de25b8906 Merge branch 'master' of gitlab-ext.galois.com:macaw/macaw-semmc 2017-10-04 10:00:04 -07:00
Tristan Ravitch
9b8a7bac21 Remove an unused module
The rewriters are now in the Arch module
2017-10-04 08:48:52 -07:00
Tristan Ravitch
a851cddebd Add arch-specific decls + type instances + rewriters
This also lets us add 'withArchConstraints' easily.
2017-10-03 18:59:35 -07:00
Tristan Ravitch
4a8828429c Implement 'RegisterInfo' for PPCReg 2017-10-03 16:31:16 -07:00
Ben Selfridge
ad8d5fc3b4 Merge branch 'master' of gitlab-ext.galois.com:macaw/macaw-semmc 2017-10-03 14:43:33 -07:00
Tristan Ravitch
6ed9d0d45d Simplify more type variables and implement the error throwing function for the disassembler
We had two different state thread parameters: s and ids.  We only need one (for
now), so unify them.
2017-10-03 11:09:23 -07:00
Tristan Ravitch
d5c5d40ddb Add more disassembly infrastructure 2017-10-02 17:32:59 -07:00
Tristan Ravitch
385bff0c4d Move the generator monad into its own module 2017-10-02 14:17:36 -07:00
Tristan Ravitch
4d9c7cd028 Split up the functions that will comprise ppc_linux_info 2017-10-02 11:19:34 -07:00
Tristan Ravitch
8820b01805 Depend on semmc/semmc-ppc and enable warnings 2017-10-02 10:26:39 -07:00
Ben Selfridge
65a7e8c17c second commit 2017-09-29 09:37:45 -07:00
Ben Selfridge
bf9b320e38 first commit 2017-08-28 15:48:55 -07:00