Commit Graph

554 Commits

Author SHA1 Message Date
Joe Hendrix
3c594dc6f8
Fix graphmod script 2018-11-12 09:42:06 -05:00
Luke Maurer
1d88f1fe98 Emit ErrorStmt rather than failing when an instruction has no successor
We were getting "Unterminated crucible block" errors for any code
containing the X86 HLT instruction.  An ErrorStmt is perhaps not
precisely what HLT means, but we're going with that for the moment.
2018-11-08 16:07:21 -08:00
Kevin Quick
8e55f1644f
[base] Remove obsolete/unused GaloisDwarf.hs file. 2018-11-02 15:56:20 -07: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
Nathan Collins
aa87eb9a45 Delete top-level stack.yaml symlink
To avoid conflicting stack.yaml files when crucible is used a
submodule in another repo with a top level stack.yaml.

Also, update the README to include creating a stack.yaml symlink
before building with stack the first time.
2018-10-30 16:12:16 -07:00
Joe Hendrix
8ce9d06d27
Fix handling for non-position independent, but dynamically linked executables. 2018-10-25 13:49:21 -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
2e93d42893
Merge remote-tracking branch 'public/master' 2018-10-22 13:04:30 -07:00
Joe Hendrix
aa6da4193b
Merge branch 'jhx/memory-cleanup' 2018-10-22 13:03:58 -07:00
Daniel Wagner
290b66588e Merge branch 'dmwit/renovate-loop-perf-2' 2018-10-22 15:04:30 -04:00
Kevin Quick
46a2c1c72a
Minor spelling fix in Types haddock docs. 2018-10-18 22:31:13 -07:00
Joe Hendrix
3948314813
Export AddrSymMap 2018-10-18 12:59:53 -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
Luke Maurer
8b0c58c661 Make architecture type families injective
This should cut down on the number of proxies/explicit type arguments
needed when dealing with these types.

Awkwardly, ArchTermStmt isn't injective, because PPC32 and PPC64 happen
to use exactly the same type. We could add an argument to that type and
then all the families could be injective.
2018-10-12 15:23:13 -07:00
Daniel Wagner
062242e8e6 implement conversion from macaw bit-scan functions to crucible 2018-10-12 13:33:13 -04:00
Daniel Wagner
5cacfec77a syscall fallthrough in CFG creation 2018-10-10 15:04:04 -04:00
Joe Hendrix
18e36f84aa
Ensure X86 register names are unique 2018-10-03 11:36:44 -07:00
Andrei Stefanescu
30b54e399a Translate PopCount to Crucible. 2018-09-28 20:25:18 -07:00
Andrei Stefanescu
9c64a192d2 Evaluate PopCount and Bsr with concrete arguments. 2018-09-27 23:23:25 -07:00
Joey Dodds
1d3ce2ce77 add back import 2018-09-27 16:48:05 -07:00
Joey Dodds
d681046ddd removed an extra space 2018-09-27 16:15:18 -07:00
Joey Dodds
4f1f8656dd Merge branch 'master' of https://github.com/GaloisInc/macaw into HEAD 2018-09-27 15:39:01 -07:00
Joey Dodds
82b60bc315 add memory command to return all symbols as opposed to just function symbols 2018-09-27 15:18:15 -07:00
Daniel Wagner
d3f19048ce don't double-offset in pretty-printer
The pretty-printer for Stmts takes a pretty-printer function as an
argument. This used when a Stmt stores an offset from the beginning of a
block can, but we don't have information about that block internally in
the Stmt.

An ArchState Stmt stores an ArchMemAddr, which is independent of the
block it's in. Previously we were treating the ArchMemAddr as an offset
and passing it to the pretty-printer function for offsets; in practice
this means most of them were printed as values about twice as big as
they were supposed to be.
2018-09-26 16:29:26 -04:00
Andrei Stefanescu
59b756c185 Add symbolic semantics for X86 sse_ucomis and sse_cvttsx2si. 2018-09-19 18:47:47 -07:00
Andrei Stefanescu
c5f0806751 Add symbolic semantics to X86 SSE floats. 2018-09-18 22:07:17 -07:00
Joe Hendrix
96bd9bee1a
Fix off-by-one bug in applying relocations. 2018-09-17 16:20:51 -07:00
Joe Hendrix
a2b2a0b0cc
Bump submodules 2018-09-17 15:41:34 -07:00
Joe Hendrix
73d24d42f9
Bump elf-edit compat 2018-09-17 15:32:18 -07:00
Joe Hendrix
c3dcfd7e3f
Update ElfLoader to apply PLT relocations. 2018-09-17 15:28:13 -07:00
Joe Hendrix
491f40caf1
Add support for R_ARM_GLOB_DAT. 2018-09-11 00:26:23 -07:00
Joe Hendrix
0193c28325
Update submodules. 2018-09-10 15:56:45 -07:00
Joe Hendrix
e180b996ce
Merge branch 'master' of github.com:GaloisInc/macaw 2018-09-10 15:34:14 -07:00
Joe Hendrix
4104191b54
Fix relocation handling; update for elf-edit/binary-symbols changes. 2018-09-10 15:33:35 -07:00
Luke Maurer
5c78e9258b
Merge pull request #11 from GaloisInc/cfg-rewriting
Adapt to changes to Crucible for CFG rewriting
2018-09-06 16:46:24 -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
Luke Maurer
9938e1f838 Merge remote-tracking branch 'origin/master' into cfg-rewriting 2018-09-05 11:52:14 -07:00
Nathan Collins
e2f25b8ce1 Merge branch 'add-arch-state-update' 2018-09-04 13:40:18 -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
Luke Maurer
e08fdf6efa Merge remote-tracking branch 'origin/master' into cfg-rewriting 2018-08-28 13:26:43 -07:00
Brian Huffman
a3d7376179 Adapt to changed crucible-llvm exports. 2018-08-27 16:16:32 -07:00