Commit Graph

127 Commits

Author SHA1 Message Date
Peter Goodman 927998635a Implements more accurate tracking of x87 exception flags, last instru… (#163)
* Implements more accurate tracking of x87 exception flags, last instruction pointer, last data pointer, and floating point instruction opcode.

* Fix that masks out the MXCSR register from being compared at the end of tests. We don't yet have good enough info to do this well. Moves the FCMOV instruction set to be under the purview of X87.cpp and its tests.

* Tests should pass now.

* Addressing issues Mike mentioned.
2017-11-14 22:50:28 -05:00
Peter Goodman 61e61db91a Adds support for specifying LLVM 3.5 in scripts/build.sh. (#161) 2017-11-09 15:10:32 -05:00
Peter Goodman b06fd79cd6 llvm 5.0 compatibility, see Issue #139 2017-09-19 15:12:53 -04:00
Peter Goodman 8595beb26d Minor updates related to changes in cxx-common. 2017-08-19 20:25:57 -04:00
Peter Goodman bef332fd2a Aarch64 tester (#128)
* Added in more aarch64 instructions. Fixed some x86 instructions. The x86 test cases now exercise each test through every possible combination of flags.

* Adding missing files

* Another missing file

* Rename file

* Fixup some macros

* IPR

* More improvements on the test runner

* Test runner fixes related to me not being familiar with aarch64 assembly

* Fixing default data layout

* Trying to use llc to compile bitcode to aarch64 assembly. wth.

* Revert back to using the CMAKE_BC_COMPILER for building the test assembly file instead of the whole CMAKE_LL_COMPILER stuff, now that I've adjusted cxx-common to use the right build target for aarch64.

* Documentation updates. Fixes for aarch64.

* Making progress. The native tests can run, but the first lifted test faults. Not yet sure why.

* Weirdest issue is happening on aarch64. A pointer argument is being compiled to an integer, and that's really screwing things up.

* Add caching of the libraries path to the main cmakelists to avoid having to re-run build.sh all the time when the TRAILOBITS_LIBRARIES env var is not globally defined. Experimenting with trying to force the semantics to be compiled using the x86_64 target, regardless of host arch, or modelled arch of the semantics. This is to try to get around the issue where a single-element struct containing a pointer is lowered into a uintptr_t when passed by value as an argument on aarch64.

* Alright, falling back on handling this problem in the lifter (for now, at least). Really not ideal.

* Test runner works afaict
2017-08-04 15:24:46 -04:00
Peter Goodman 8f1eb2c663 Added back in dependencies on /etc/lsb-release because I didn't realize /etc/os-release was a systemd-specific thing. 2017-07-24 19:43:43 -04:00
Peter Goodman dae658ebe4 Making the build script choose the library version file with the arch name attached. 2017-07-24 19:36:38 -04:00
Peter Goodman 906cf0fe32 Improved the build script to be able to specify a build dir, a different install dir, a different llvm version, and whether or not to use the system compiler. This should finish off fixing Issue #122 and #124. 2017-07-19 11:49:27 -04:00
Peter Goodman a1697ec445 Minor changes to make remill build with gcc. Test cases don't build with gcc, though. Removed the <INCLUDES> special variable in the cmake file that adds the BC language. Made it so that runtimes get installed to a LLVM version-specific directory; this fixes Issue #124. Made it so that the build script creates the remill-build dir in the current working directory, rather than in the parent directory of the remill dir itself. Hopefully this will help with Issue #122. Also discovered a bug in LLVM's assembler related to the memory operand sizes of the parallel unpack mmx instructions. 2017-07-18 15:06:18 -04:00
Peter Goodman 38aa788f96 Issue 122 build script (#125)
* Working on issue #122 that removes sudo from the build script and some other little things

* Some stuff relating to Issue #122, some relating to aarch64. My commits are all over the place. Fundamentally, I'm working toward getting travis stuff kind of working. One issue atm is getting the C++ abi right when trying to build remill using old versions of LLVM.

* Adding vector regs to aarch64 basic block function. Also, seems that most things can compile with gcc, although there are some issues compiling the mcsema runtime
2017-07-14 15:29:26 -04:00
bdlm_t 85f0c0a707 Using nproc (from Ubuntu coreutils) to determine the maximum number of processors available to perform a parallel build. 2017-06-19 16:39:28 -04:00
Peter Goodman 71bf240a01 Minor fix for rerunning the build script. Added MOVZ post-decoder and semantics 2017-06-17 13:32:59 -04:00
Peter Goodman 864aaa575d Simplifications to build process, added caching to travis thing, hopefully that works 2017-06-14 21:51:31 -04:00
Peter Goodman 592b6cbe8d Aarch64 support and other stuff (#113)
* This includes most of Alessandro's wonderful cmake changes, and starts into AArch64 support, though not using Capstone anymore.

* Trying to make travis work

* Minor additions, still not completely working on my ubuntu 14.04 vm or on travis

* Making progress on getting travis to build

* Some documentation improvements

* I push the travis button
2017-06-14 19:57:57 -04:00
Peter Goodman e1bdbdba9e Alessandro/refactor/llvmmultiversion cmake (#111)
* Change copyright notice in all the places. Trying to get cmake to download all the things

* CMake refactor

* Added the lib repository installer

* Fixed a couple of paths in library repository scripts

* Spelling and a missing .gitignore file.

* The google test library was not correctly linked

* Removed the pre-compiled XED library

* Removed unused files; fixed the INSTALL directives. Added automatic protobuf generation.

* Added a package generator script for ArchLinux

* Merged in Alessandro's cmake magic

* Cleanups, compatibility changes

* CMake cleanup.

 o Removed the cmake folder as it is no longer used.
 o Removed the library_repository_installer directory and
   replaced it with a submodule to the newly introduced
   cxx_common repository.
 o Added the 'use_remill_semantics' branch of mcsema as a
   submodule under tools/cmake.
 o Updated the README instructions (added --recursive to the
   git clone command).

Warning: the mcsema submodule is pointing to my fork of the
repository!

* CMake: avoid re-defining the C/CXX/ASM compiler.

This will prevent CMake from looping forever when using submodules.

* The tools/mcsema submodule now points to the official repository.

* mcsema submodule update

* Updated the mcsema git submodule to track the newest changes.

* Various CMake fixes (see details).

 o External include headers were not correctly marked
   as SYSTEM. This caused them to output warnings and
   break the build.
 o The PROJECT_SOURCE CMake variable has been replaced
   with CMAKE_SOURCE_DIR.
 o Updated the mcsema submodule to point to the latest
   CMake fixes.

* Getting closer to having the test case runner work again without using the CFG protobufs.

* Trying to make things use ubuntu clang/llvm packages

* Update to the mcsema submodule.

* Minor changes for llvm version compatibility

* Test cases should run now. Had to compile the lifted testcases to a .S file, as with the .bc file, they were being optimized away.. I think. The compilation to assembly seems unusually slow, though.

* Minor change

* Some stuff for llvm 4.0 support

* Remove mcsema sub-module

* Remove cxx-common submodule

* First steps toward getting travis working again

* Attempt at getting travis working again

* Using https for cloning instead of ssh

* Minor build script update

* Added ISEL_ prefix to isels to make it easier for ForEachISel to find them. Commented out the defer_inlining intrinsics.

* Changes related to mcsema2

* Simplify runtime targets generation. (#110)

* CMake refactor: Added a new language 'BC' for the bitcode (see details).

The language is used to generate the runtimes used by the architecture
modules. The required executables (clang++ and llvm-link) are
automatically detected in the same way as other compilers are.

A new CMake function has been added and it can be used to easily
generate runtime targets in a way similar to add_executable:

    add_runtime(<name> SOURCE <source list> ADDRESS_SIZE <n>
        DEFINITIONS <definition list>)

Additionally, all files ending with the *.bcpp extensions will
automatically invoke the bitcode compiler when listed in an
active target.

This should open support for parallel compilation! You just have to
list all your .cpp files when calling add_runtime.

* CMake: Fixes to the BC language handler.

* CMake/BC: Use '.bo' for object files. X86 runtime: Add -g/-O flags.
2017-05-15 13:00:33 -04:00
Peter Goodman 7dd87902ea Vmill (#106)
* Initial commit of x86 program snapshotter. Haven't yet figured out how to save a core dump to a specific file.

Now finds and saves core dumps (in a sketchy way).

Kind of but didn't really fix remill-disass with core dumps. It almost seems like a bunch of stuff is missing from within a core dump. It may be the case that it will be simpler to use binary ninja directly on snapshot files.

Working toward the executor.

Have snapshot creation and loading working. Next up: decoding the first few instructions!

Starting to serverize remill and setting up lines of communicating between vmill and remill. Going to move on to finally implementing remill-opt.

Changed a bazillon things.

Fixed the dead register backward data-flow analysis.

Fixed soem bugs, added GEP re-association, working toward inserting stores that will kill values.

Got interprocedual dead store elimination working! :-D

Finally...dead store elimination

remill-opt is done.

Added Lifter interface

Spec'ing out the translation engine.

Got the dynamic decoder working!

Got bitcode caching working

Added caching layer for bytecode compilation.

Decided on how to access reg state and allocas in functions. The bytecode will treat the state struct and the alloca'd data as a contiguous, opaque, byte-addressible area.

Compiler seems to work

Refactor

Great progress...goodnight

Made it up to the first syscall

Fixed call to a hypercall intrinsics

Bug fixes, minor change to the CFG proto.

Refacotorings and changes

* Switching to trying nativeexec, and made memory32 map snapshot into low 32-bits of address space, preserving original addresses of program.

* About to make some interesting changes, so save save save

* Refactor done, now time to produce shared libraries

* Got initial execution of some stuff in PHP working.. it either seems like the code is in an infinite loop, or just horribly slow, not sure. Otherwise, amazing progress.

* Got initial compiling to a runtime dynamic library working

* Separated most DEF_ISEL_SEMs and tests still pass. Goodnight!

* Got incremental optimization and compilation working.

* Got caching of the bitcode file to disk working and periodically collapsing the shared libraries into a single library. OUT.

* Fixed some bugs

* Commit before the storm

* Made the JIT work again, still not that fast though.

* Minor logging fix

* Log an error that we're executing a missing instruction.

* JIT compile the whole module first, then incrementally JIT compile function partitions. Also, link in libm.

* Added new syscall

* Added breakpoint sync hypercall, useful for testing.

* Got a php5.4 unserialize bug to reproduce. Added remill-pinshot, which will use PIN to take a snapshot and print out a register trace. This is useful for debugging divergences. Fixed up the semantics of some instructions, and added semantics and tests for PSRLDQ.

* Simplifications to remill that removes all the various basic block arrays, and uses meta-data instead.

* Made cmake take over the test system

* Working on mega refactor to eventually permit klee support

* Made all semantics code return memory pointer; I think this makes LLVM's optimizer a bit happier. Made the __remill_sub_N things into global constants, referencing the actual functions, that have private linkage. Slowly getting back in the direction of execution. I've got some bitcode translation working (with a hard-coded address for my local php version). The address space stuff seems to work so far.

* Missing files.

* Other minor fixes

* rtti-related fixes for gtest

* minor travis config change

* minor travis config change

* sendfile no longer needed

* Disable building vmill on non-linux platforms

* Disable 32-bit test builds on macOS.

* Trying to get symbol names on mac right.

* Minor fix to save state code for tests, disable testing on macOS builds because of symbol mismatches in gtest.

* Fixup remill-disass to use the simplified proto structure. Something may be wrong with remill-opt, or installing remill opt. Remove caching from travis.
2017-03-23 15:49:33 -04:00
Peter Goodman 827ff5de57 Changing tools/disass to tools/remill_disass so that I can have something similar with mcsema but without package name conflicts of disass 2017-02-10 16:52:49 -05:00
Peter Goodman 1a2e4d11f9 Vmill backport (#81)
* Backporting changes from vmill to remill. One set of changes is to remove DEF_ISEL_SEM, requiring that one use DEF_ISEL and DEF_SEM separately. This makes some simple instruction semantics more tedious to implement. The main goal is for ALL semantics themselves to be treated as private, non-exported symbols. In the case of those semantics defined via DEF_ISEL_SEM, those weren't private, and this inhibited inlining optimizations. Another big change is that function cloning has been rewritten and no longer depends on LLVM's function cloning implementation. Another big change is that the meat of the optimizer has been put into the remill/BC subdirectory and wrapped in a class, enabling it to be used independently of remill-opt. There are some new instruction semantics, and fixes to those. Some new utility functions for iterating over lifted blocks in the module. Attach/detach intrinsics have been removed, as they don't (yet) explicitly fit within the current model. The AssemblyWriter, which would produce a .S file and debug info linking lifted bitcode to the .S file via source line debug info has been removed. Despite it being really cool, the actual benefit is not obvious, given that optimization of the bitcode doesn't actually propagate enough of that information after inlining.

* Eliminate sendfile dependency.
2017-01-05 12:22:10 -05:00
Peter Goodman 65f3812cce Opt (#76)
* Implements remill-opt

* Change back to google namespace

* ANother namespace change

* Should fix test runner.

* Try to fix deprecated use of fstat64 on macOS
2016-11-28 20:44:02 -05:00
JP Smith 708f8fd4a0 OSX gtest debugging (#74)
* move gtest headers around

* start debugging travis' weird gtest issues

* fix directory

* put libraries where they should be

* skip testing on OS X
2016-11-22 11:37:50 -05:00
JP Smith b533f750e4 move gtest headers around (#69) 2016-11-08 10:35:33 -05:00
JP Smith c8e0c37710 OS X build (#61)
* Start adding OS X compatibility

* wrong unzip command

* update README

* first shot at build.sh

* clean up CMakeLists

* unnecessary CMake flag

* build.sh finally works (on my machine)

* start work on travis integration with new build.sh

* fix directory issues

* fix script name typo

* fix unnecessary brew stuff for os x

* build.sh should work on travis now

* make tests not fail on apple

* forgot to add file to fix mac/macos confusion
2016-11-04 10:35:41 -04:00
Peter Goodman 284ef26018 Issue 50 ida get cfg (#67)
* Starting work on Issue #50, implementing an IDA Python script for producing a CFG file. The approach taken is to fill in a generic data structure, and some other code will deal with the production of the CFG structure itself. This will enable moving beyond the protobuf format. The script can be used via remill--disass. Eventually Binary Ninja will support a batch mode, and I will work it into remill-disass when that happens.

* remill-disass can now be installed and executed directly. There were some issues with the PYTHONPATH but I think those are resolved.

* Added in command-line flag to change the log level.

* Added conditions to prevent non-termination, especially in the presence of noreturn calls.

* Try to fix travis

* remill-disass seems to work reasonably well now.
2016-11-01 18:00:42 -04:00
Peter Goodman 9a5f684dd3 Attempted rebase against master with a bit of restructuring of the MMX semantics
Issue 44 mmx support (#58)

* Should fix Issue #56. Used -isystem instead of -I, as it's an include of <cstdint> instead of "stdint.h". @erhlee-bird does this work on your system?

* Minor changes

* Remove old 'test' function.

* Start to MMX PUNPCK instructions.

* Initial example for a PUNPCK instruction.

* Cleanups to Operators.h. Specifically, to the signed versions of vector operations. They now more strictly enforce type safety. This caught a few bugs. Operators.h is arguable simpler as a result.

* MMX Instruction support(PADD/PSUB); Fix for handling signed operations;

* Should fix Issue #56. Used -isystem instead of -I, as it's an include of <cstdint> instead of "stdint.h". @erhlee-bird does this work on your system?

* Minor changes

* Cleanups to Operators.h. Specifically, to the signed versions of vector operations. They now more strictly enforce type safety. This caught a few bugs. Operators.h is arguable simpler as a result.

* merged conflict;

* MMX Instructions (PAVG/PHSUB/PMULHRS)

* Testcases for PADD/PSUB; Fix for signed/unsigned saturation;

* Test cases for PAVG/PABS/PACKSS; Fixes for MMX instructions handling;

* Fixed PACKSSWB instruction handling;

* PHADD/PHADDSW Instruction;

* PMAXSW/PMAXUB/PMINSW/PMINUB Instructions

* PCMP/PUNPCK/PMUL Instructions;

* Corrected space indentation;

* Fixed build issue;

* reimplemntation of instructions with saturation arithmetic

Minor syntax fixes. Added beginning of an implementation for EMMS.

Issue 44 mmx support (#65)

* Remove old 'test' function.

* Start to MMX PUNPCK instructions.

* Initial example for a PUNPCK instruction.

* MMX Instruction support(PADD/PSUB); Fix for handling signed operations;

* Should fix Issue #56. Used -isystem instead of -I, as it's an include of <cstdint> instead of "stdint.h". @erhlee-bird does this work on your system?

* Minor changes

* Cleanups to Operators.h. Specifically, to the signed versions of vector operations. They now more strictly enforce type safety. This caught a few bugs. Operators.h is arguable simpler as a result.

* merged conflict;

* MMX Instructions (PAVG/PHSUB/PMULHRS)

* Testcases for PADD/PSUB; Fix for signed/unsigned saturation;

* Test cases for PAVG/PABS/PACKSS; Fixes for MMX instructions handling;

* Fixed PACKSSWB instruction handling;

* PHADD/PHADDSW Instruction;

* PMAXSW/PMAXUB/PMINSW/PMINUB Instructions

* PCMP/PUNPCK/PMUL Instructions;

* Corrected space indentation;

* Fixed build issue;

* reimplemntation of instructions with saturation arithmetic

* PSLL/PSRL/PMUL instructions;

* Add in some missing arg parsing to Run.cpp. Set the minimum default log level in the test runner so that Travis logs don't explode so much, causing Travis to cancel an otherwise 'good' job.

* Update README.md (#62)

Fixed install path for install_gtest.sh

* Fixed failing testcases for PSLL/PSRA/PSRL/PACKSS

* Cleanup and resolved TODO comments;

* Added new testcases for MMX instructions;

* Fixes Issues #52 and #53. Addresses first comment of Issue #45.

* MIssing file

* Renaming test cases

* In progress changes. Moduler verifier is complaining about lack of \!dbg location entries. Adding a SourceWriter to produce something semi-useful.

* Linking lifted instruction code to printed out assembly code now works

* Added new instruction and testcase for CVTPI2PS. Made general improvements:
- made it so that disassembled instructions can be printed to a file, and linked back to the bitcode via debug info.
- eliminated the unnecessary _read and _write suffixes for registers in __remill_basic_block.

Mostly cosmetic changes. For example, limiting line length, putting spaces before the opening parens of loops, etc. Renamed all the semantics files to be cpp source files instead of header files. That stops cpplint from complaining about anonymous namespaces in headers ;-)
2016-10-18 17:23:57 -04:00
kumarak b0055b6503 Issue 44 mmx support (#58)
* Should fix Issue #56. Used -isystem instead of -I, as it's an include of <cstdint> instead of "stdint.h". @erhlee-bird does this work on your system?

* Minor changes

* Remove old 'test' function.

* Start to MMX PUNPCK instructions.

* Initial example for a PUNPCK instruction.

* Cleanups to Operators.h. Specifically, to the signed versions of vector operations. They now more strictly enforce type safety. This caught a few bugs. Operators.h is arguable simpler as a result.

* MMX Instruction support(PADD/PSUB); Fix for handling signed operations;

* Should fix Issue #56. Used -isystem instead of -I, as it's an include of <cstdint> instead of "stdint.h". @erhlee-bird does this work on your system?

* Minor changes

* Cleanups to Operators.h. Specifically, to the signed versions of vector operations. They now more strictly enforce type safety. This caught a few bugs. Operators.h is arguable simpler as a result.

* merged conflict;

* MMX Instructions (PAVG/PHSUB/PMULHRS)

* Testcases for PADD/PSUB; Fix for signed/unsigned saturation;

* Test cases for PAVG/PABS/PACKSS; Fixes for MMX instructions handling;

* Fixed PACKSSWB instruction handling;

* PHADD/PHADDSW Instruction;

* PMAXSW/PMAXUB/PMINSW/PMINUB Instructions

* PCMP/PUNPCK/PMUL Instructions;

* Corrected space indentation;

* Fixed build issue;

* reimplemntation of instructions with saturation arithmetic
2016-10-04 11:06:47 -04:00
Peter Goodman 839f6cb882 Remove old build scripts. 2016-10-01 19:12:08 -04:00
Peter Goodman 08f5384a94 Issue 51 third party code (#60)
* Working on factoring out external dependencies

* Making progress

* CMake for remill-lift seems to work :-)

* Improving build process and dependency list. Using a blank ubuntu 14.04 vm for testing.

* Still fighting with various dependencies.

* Making more progress with CMake stuff! Now have the semantics get compiled with cmake, and support installing stuff. I have also attempted to auto-find the semantics files when --bc_in is not provided.

* Adding protobuf compilation back to the steps.

* Improving readme

* Improving readme

* Switch to using the  command.

* Updated travis. Updated README to include new build badge icons, to change where the ldconfig step goes, and to add a CMake notice for ubuntu trusty.

* Added script to generate tests. Added auto-yes in apt-add-repository commands.

* Minor fix

* Enable auto-finding of --bc_in based on --arch_in.

* Adding more test generation and compilation. Unfortunately compiling tests isn't working due to llvm::CloneFunctionInto not quite working anymore.

* llvm::CloneIntoFunction seems to work, which may resolve Issue #55. I'll need to double check with the official release version of LLVM; right now I'm using a custom debug build to try to catch issues. Added code to build and install gtest. Directly referenced which LLVM libraries must be linked. Added backup paths for deducing the semantics bitcode files based on the input arch. Made remill-lift report simple flag errors via stderr instead of using glog to abort the program. Fixed an issue where, when I added the various arch versions, xed was decoding avx-enabled instructions as 64-bit because the comparison condition deciding which decode state to use was too narrow.

* Tests generation and running scripts now work for me. Gotta test in fresh vms now.

* Addresses Issue #55. The problem was that the release version of clang 3.9 isn't guaranteed to preserve c++ variables name in the bitcode. I've added some stuff to re-introduce the variable names based on debug info.

* Build the test runner with rtti so that gtest doesn't complain on some versions of ubuntu.

* Fixing up Travis build stuff

* I am dumb; forgot to add the os-generic install file for travis to pick up.

* Change the trusty build type to generic, otherwise Travis uses a YUGE vm with all the things.

* Disable aptitude upgrading. dhclient is getting in the way.

* Re-order the linux-specific travis install script. Hope that protocol buffers gets installed correctly this time. Remove test generation and running from end of install script -- it doesn't belong there.

* Try to purge dhcp client, then add it back in, then do the normal update + upgrade

* Something is very dumb about Travi CI's generic linux build environment. It seems to be having trouble with the protobuf-compiler package -- that or somehting is going wrong just before that package is installed.

* Use the cpp build language -- I think this defaults to that mega vm though. Print out better OS information at the beginning of the travis install. Individually install needed packages, as opposed to doing it all at once.

* OK, using cpp language got me further, but builds take much longer. I was still missing cstdint, though. This time I'll try building with the generic trusty travis image, and with build-essential and the g++ 4.8 stdlib dev files installed.

* Lets try using the libstdc++ dev files

* Add in the x32 versions of the dev files. Hopefully that'll resolve the missing cstdint for the 32-bit builds of some of the instruction semantics bitcode files.

* Hopefully these are right!

* Install g++ multilib package.

* Simplifications to installer, and also to the README to now use g++-multilib.
2016-10-01 19:10:37 -04:00
Peter Goodman 6178c83166 Merge pull request #57 from trailofbits/issue_56_missing_cstdint
Should fix Issue #56. Used -isystem instead of -I, as it's an include…
2016-09-22 19:17:48 -04:00
Peter Goodman d07d065fb6 Enabled more aggressive compiler warnings. This caught one bug in COND_BR.h. Added some pragmas into the types and state structure related files to make sure that extra padding added to structures is reported as a fatal error. The rest of the changes are downcasts from 64-bit values to 32-bit values. 2016-09-21 14:05:07 -04:00
Peter Goodman 50d64ef5a1 Should fix Issue #56. Used -isystem instead of -I, as it's an include of <cstdint> instead of "stdint.h". @erhlee-bird does this work on your system? 2016-09-21 11:08:54 -04:00
Peter Goodman 3d74805dab Switch to ncurses 2016-09-07 17:39:57 -04:00
Peter Goodman da643fa3cb Merge pull request #39 from rgov/mac
Fix build on macOS
2016-09-07 11:57:28 -04:00
Peter Goodman 7c60cd3860 Build changes 2016-09-07 11:35:11 -04:00
Peter Goodman d755a870cf Added potential support for openSUSE builds 2016-09-03 16:06:41 -04:00
Peter Goodman f283e05616 Added semantics and tests for CVTDQ2PD and CVTTPD2DQ 2016-09-01 20:57:39 -04:00
Peter Goodman 773919bd40 Added NOPs. 2016-08-31 20:46:02 -04:00
Peter Goodman c7d9122e26 Updated binja script for simpler cfg protobuf format. Fixed X86/Arch.cpp to record x87 ST(n) regs as 64 bits. Updated llvm version to 3.8.1. Updated bootstrap to choose the release of the installed ubuntu version (mine is now 16.04, previously 14.04). 2016-08-31 17:47:31 -04:00
Peter Goodman 5eef7ead59 Re-introducing cfg::Instr. Marked extern funcs as not builtin so that they won't conflict with builtins needed to implement fpu instructions. Updated the address translation to have the scale be signed, and to implement the displacement as an add for positive numbers, and a subtract for negative numbers. 2016-08-29 12:47:28 -04:00
Peter Goodman 1b012f75f3 Added tests for MOVQ. Starting implementation of FPU instructions and tests. Change how instruction lifting is done. The arch side of lifting is now separate from all bitcode concerns. remill/BC/Translator.cpp is now heavier weight in what it does. 2016-08-26 15:59:52 -04:00
Kareem El-Faramawi d9ede09aa7 Add function references as indirect blocks 2016-08-08 17:08:47 -04:00
Kareem El-Faramawi 5380487bde Add jump table entries as indirects 2016-08-08 17:08:47 -04:00
Kareem El-Faramawi c08ca9f50f Clean up how indirects are added 2016-08-08 17:08:47 -04:00
Kareem El-Faramawi 2e01103ded Process instructions, create indirect blocks at terminators 2016-08-08 17:08:47 -04:00
Kareem El-Faramawi 497eac715e Process basic blocks 2016-08-08 17:08:47 -04:00
Kareem El-Faramawi 8740835f78 Use update_analysis_and_wait 2016-08-08 17:08:47 -04:00
Kareem El-Faramawi 3e46dc0498 Add basic function processing 2016-08-08 17:08:47 -04:00
Kareem El-Faramawi d6c94946e1 Add arguments 2016-08-08 17:08:47 -04:00
Kareem El-Faramawi 17da66e732 Create binja_get_cfg.py 2016-08-08 17:08:47 -04:00
Peter Goodman ba427a3b4b Starting to add some more FPU stuff, though untested. Decided on a simpler way of handling conversions between float80_ts and float64_ts. The idea is to just punt on float80_ts, with the idea that all sources of them will come via memory locations, or at attach/detach time. 2016-08-08 17:05:44 -04:00
Peter Goodman 81df2663d9 Changes to how conditional branches are handled. Made the x86 translator code even less OO. Removed the conditional_branch and create_program_counter intrinsics. 2016-08-08 17:05:44 -04:00