Commit Graph

180 Commits

Author SHA1 Message Date
Joe Hendrix
1607e83eef
Minor refactoring; improved branch abstract state propagation.
This primarily refines the abstract state propagated to branch
pairs.  It was needed on the ARM platform to support the IT blocks
with the changes to the Core representation in macaw-base 0.3.6.

This also includes a few simplifications added and comment
improvements.
2019-05-14 17:45:30 -07:00
Joe Hendrix
c6a7ba7cd6
Rename pblock fields to be more descriptive. 2019-04-29 22:21:10 -07:00
Joe Hendrix
327003ae56
Fix test case. 2019-04-29 22:04:21 -07:00
Joe Hendrix
3331a19571
Drop support for branches within blocks. 2019-04-28 13:19:20 -07:00
Joe Hendrix
2d12aea63b
Merge branch 'jhx/bump-submodules' into jhx/cond-write 2019-04-26 10:38:50 -07:00
Joe Hendrix
89f89e9ce6
This adds a conditional memory write to macaw. 2019-04-17 11:15:12 -07:00
Joe Hendrix
ec15debe20
Minor updates 2019-04-12 11:24:37 -07:00
Joe Hendrix
ef6951458a
Add pop tests. 2019-04-04 09:42:11 -07:00
Joe Hendrix
092cbc2e26
Minor fixes to tests 2019-04-03 16:44:00 -07:00
Joe Hendrix
3e763cc7a1
Add ret test 2019-04-03 16:43:42 -07:00
Joe Hendrix
74e8c6580e
Merge pull request #32 from GaloisInc/jhx/x86_tests
Add tests for btc/btr/bts
2019-04-03 13:59:50 -05:00
Joe Hendrix
036944d42e
Add btc/btr/bts tests 2019-04-03 08:24:57 -07:00
Joe Hendrix
a6149fa95f
Add x86-support to travis 2019-03-26 08:21:01 -07:00
Joe Hendrix
f1f16b7509
Remove warnings 2019-03-22 14:40:14 -07:00
Joe Hendrix
51333f4612
Deprecate outdated disassemble block functions. 2019-03-14 10:41:11 -07:00
Joe Hendrix
e8d2efcaae
Implement bitcast changes to macaw-symbolic 2019-02-26 17:53:34 -08:00
Joe Hendrix
c950affd65
Fix build errors made in previous commit. 2019-02-20 15:57:56 -08:00
Joe Hendrix
00096344a7
Support float/vector in reads/writes; Use floating point types. 2019-02-20 15:40:59 -08:00
Joe Hendrix
d3947f32b4
Support ZMM, bitcasting, and fixed length vectors. 2019-02-14 11:06:45 -08:00
Luke Maurer
cbda1717cc Fix for GHC versions < 8.8
`MonadFail` being a forward-compatibility measure, overriding
`Control.Monad.Fail.fail` in GHC versions <= 8.6 doesn't do anything
unless `Control.Monad.Fail.fail` is invoked explicitly (or the importing
module happens to have `-XMonadFailDesugaring` on).
2019-02-12 18:24:41 -08:00
Langston Barrett
274808a8ae update parameterized-utils submodule 2019-02-11 11:47:19 -08:00
Tristan Ravitch
05249a4632 Change some calls to fail into translation errors
These `getCallTarget` and `doJump` were calling `fail` if they saw an argument
type that we hadn't thought to handle yet.  This change turns those errors into
TranslationError statements, allowing macaw to continue exploring code.

This came up recently in a glibc-based example where macaw ended up exploring
unaligned code and creating a strange jump to a far pointer, which doesn't make
much sense in x86_64 mode.
2019-01-23 13:22:03 -08:00
Joe Hendrix
a5e3ba7247
Additional exports 2019-01-22 15:51:38 -05:00
Joe Hendrix
3eb92f34e1
Add x86_tests 2019-01-22 13:25:37 -05:00
Joe Hendrix
0eac4d6b49
Remove blockAddr; update dependencies 2019-01-22 05:07:52 -05:00
Tristan Ravitch
68c5578f03 symbolic: Translate the InstructionStart metadata statement into Crucible
Before, we just discarded them during the translation.  They are useful metadata
for generating diagnostics in Crucible, so this commit translates them.  They
are no-ops during symbolic evaluation.

To make them truly useful, they need to include the address of the block that
they belong to (their data payload in macaw is just an offset from the start of
a block).  This information wasn't available before, so it has to be plumbed
through in macaw-x86.
2019-01-10 22:23:39 -08:00
Kevin Quick
98807daee2
Added -Wcompat for warnings about future compatibility. 2019-01-10 13:43:27 -08:00
Joe Hendrix
ebc5d9575e
Merge remote-tracking branch 'public/master' into jhx/plt-support 2018-12-04 08:04:32 -08:00
Joe Hendrix
f03941d607
Add test-plt test case, and fix discovery to use trust symbols. 2018-12-04 00:04:23 -08:00
Andrei Stefanescu
3f39c614e9 Add support for RepMovs and RepStos. 2018-11-27 02:23:36 -08:00
Kevin Quick
1d7cdc87eb
Implement NoStarIsType and MonadFail for GHC 8.6. 2018-11-21 00:08:33 +00:00
Joe Hendrix
c4b7252c77
Add specialized terminal statement for PLT stubs. 2018-11-16 13:40:40 -05:00
Joe Hendrix
23fe50bd45
Fix stack offset. 2018-11-12 15:28:32 -05:00
Joe Hendrix
bb63f9f859
This fixes tail call detection, and allows architecture-specific checks. 2018-11-12 11:56:44 -05:00
Kevin Quick
ceba0bfa67
[x86] Update memory references to remove deprecated uses. 2018-10-31 13:48:06 -07:00
Kevin Quick
db17327121
[x86] Add andnps semantics with consolidation of binary bitwise support. 2018-10-31 11:50:15 -07:00
Kevin Quick
6d996f7739
[x86] Add shld and shrd instruction semantics. 2018-10-31 11:49:14 -07:00
Kevin Quick
1ca2c5582c
[x86] Fix cvtsd2ss instruction mnemonic. 2018-10-31 11:48:18 -07:00
Kevin Quick
3c76f404af
[x86] Comment fixes. 2018-10-31 11:47:52 -07:00
Kevin Quick
6212a69233
[x86] Add semantics for sqrtss and sqrtsd. 2018-10-31 11:46:01 -07:00
Joe Hendrix
4594938dfd
Make decoding position independent; Support translating fixed blocks. 2018-10-25 13:36:21 -07:00
Tristan Ravitch
0513ae7a39 x86: Add some more missing signed immediate handling cases in getAddrRegSegmentOrImm
This is not currently an error, as this function is only used in the definition
of the semantics for push, which doesn't accept a signed immediate value.  This
fix is defensive in case someone decides to re-use this helper in another
context where the missing cases could cause a problem.
2018-10-24 10:25:18 -07:00
Tristan Ravitch
d6060e51be x86: Fix a bug affecting imul (and add a test case)
We were hitting a translation error for imul in another application - this test
case is a reduced example demonstrating the problem.

The root cause was that there were a few missing cases for the new signed
immediate values from flexdis; this caused a fallthrough that mis-identified
signed immediates as non-immediates, triggering an error.
2018-10-24 10:23:51 -07:00
Tristan Ravitch
cc165d7316 x86: Make the test suite more verbose on translation errors
This makes debugging easier
2018-10-24 10:22:21 -07:00
Tristan Ravitch
563547fee5 Add semantics for minss, maxss, minsp, and maxsp (x86) 2018-10-23 15:18:40 -07:00
Joe Hendrix
c886c19b03
Rename Memory exports.
This update renames many of the declarations exported by
Data.Macaw.Memory so that we have more consistent names.

The majority of the existing names are now exported with DEPRECATION
warnings.  Some of the symbol declarations that were not used by the
Memory datatype have been moved to other modules.

The minor version of macaw-base has been incremented.
2018-10-18 10:07:20 -07:00
Joe Hendrix
18e36f84aa
Ensure X86 register names are unique 2018-10-03 11:36:44 -07:00
Andrei Stefanescu
c5f0806751 Add symbolic semantics to X86 SSE floats. 2018-09-18 22:07:17 -07:00
Andrei Stefanescu
bd906c85a9
Merge pull request #13 from GaloisInc/floating-point
Add support for floating-point.
2018-09-06 14:05:23 -07:00
Nathan Collins
b6bc9c91e7 Generate MacawArchStateUpdate stmts in Crucible IR
By adding `asAtomicStateUpdate` in analogy with
`Data.Macaw.SemMC.Generator.asAtomicStateUpdate` and its use in
`Data.Macaw.PPC.Disassemble`.
2018-08-30 14:49:37 -07:00