Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Commit

Permalink
Issue 323 unimplemented avx instructions (#328)
Browse files Browse the repository at this point in the history
* Updates mcsema to understand that the InstructionLifter returns a LiftStatus now, instead of a bool. This allows us to partially resolve Issue #323. Next up is instruction support.

* Add missing function to runtime.
  • Loading branch information
pgoodman committed Nov 17, 2017
1 parent f5cce24 commit a68f401
Show file tree
Hide file tree
Showing 8 changed files with 425 additions and 591 deletions.
2 changes: 1 addition & 1 deletion .remill_commit_id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b41a0723e96e20b326923c90748324823b24c51b
fe44e648539ffcb3378875db3de91d8fcfc5e67e
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,24 @@ Why would anyone translate binaries *back* to bitcode?

## Dependencies

| Name | Version |
| ---------------------------------------- | -------------------------------------- |
| [Git](https://git-scm.com/) | Latest |
| [CMake](https://cmake.org/) | 3.2+ |
| [Google Protobuf](https://github.com/google/protobuf) | 2.6.1 |
| [Google Flags](https://github.com/google/glog) | Latest |
| [Google Log](https://github.com/google/glog) | Latest |
| [Google Test](https://github.com/google/googletest) | Latest |
| [Intel XED](https://github.com/intelxed/xed) | Latest |
| [LLVM](http://llvm.org/) | 3.6+ |
| [Clang](http://clang.llvm.org/) | 3.6+ (3.9 if using Visual Studio 2015) |
| [Python](https://www.python.org/) | 2.7 |
| [Python Package Index](https://pypi.python.org/pypi) | Latest |
| [python-protobuf](https://pypi.python.org/pypi/protobuf) | 3.2.0 |
| [IDA Pro](https://www.hex-rays.com/products/ida) | 6.7+ |
| [Visual Studio](https://www.visualstudio.com/downloads/) | 2013+ (Windows Only) |

## Getting and building the McSema code
| Name | Version |
| ---- | ------- |
| [Git](https://git-scm.com/) | Latest |
| [CMake](https://cmake.org/) | 3.2+ |
| [Google Protobuf](https://github.com/google/protobuf) | 2.6.1 |
| [Google Flags](https://github.com/google/glog) | Latest |
| [Google Log](https://github.com/google/glog) | Latest |
| [Google Test](https://github.com/google/googletest) | Latest |
| [Intel XED](https://github.com/intelxed/xed) | Latest |
| [LLVM](http://llvm.org/) | 3.5+ |
| [Clang](http://clang.llvm.org/) | 3.5+ (3.9 if using Visual Studio 2015) |
| [Python](https://www.python.org/) | 2.7 |
| [Python Package Index](https://pypi.python.org/pypi) | Latest |
| [python-protobuf](https://pypi.python.org/pypi/protobuf) | 3.2.0 |
| [IDA Pro](https://www.hex-rays.com/products/ida) | 6.7+ |
| [Visual Studio](https://www.visualstudio.com/downloads/) | 2013+ (Windows Only) |

## Getting and building the code

### On Linux

Expand Down
10 changes: 10 additions & 0 deletions mcsema/Arch/X86/Runtime/Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/

#include <cstdio>
#include <cfenv>
#include <cfloat>
#include <inttypes.h>

#define HAS_FEATURE_AVX 1
Expand Down Expand Up @@ -231,4 +233,12 @@ Memory *__remill_atomic_end(Memory * memory) {
return memory;
}


int __remill_fpu_exception_test_and_clear(int read_mask, int clear_mask) {
auto except = std::fetestexcept(read_mask);
std::feclearexcept(clear_mask);
return except;
}


} // extern C
Loading

0 comments on commit a68f401

Please sign in to comment.