Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension of bin2llvmir with optimization of X87 FPU stack. #715

Merged
merged 110 commits into from
May 28, 2020

Conversation

JurajHolub
Copy link
Contributor

Reimplementation of current FPU stack analysis. The new design supports dependencies of CFG for functions and BasicBlocks. Optimization uses 3rd party library Eigen for calculation with matrices. The new component also includes a set of unit tests.

JurajHolub and others added 30 commits August 23, 2019 11:50
…tions and unit test of new supported instructions.
…conventions and different architectures of x86.

Tests for architectures x86-16, x86-32, x86-64.
Tests for calling conventions cdecl, pascal, fastcall, stdcall, thiscall.
…nstruction to llvmir.

FBLD, FBSTP, FNCLEX, FLDCW, FLDENV, FRSTOR, FNSAVE, FNSTENV, FNSTCW, FXSAVE, FXSAVE64, FXRSTOR, FXRSTOR64, FPTAN, FPATAN, FSCALE, FXTRACT, FXAM.
Tests for calling conventions:
- x86-16: cdecl, pascal, fastcall, watcom, unknown
- x86-32: cdecl, stdcall, pascal, fastcall, thiscall, watcom, unknown
- x86-64
…with floating point return value (definitions and calls).

Analyzed calling conventions:
- x86-16: cdecl, pascal, fastcall, watcom, unknown
- x86-32: cdecl, stdcall, pascal, fastcall, thiscall, watcom, unknown
- x86-64
… basic block TOP tracking. Include OpenCV lib.
…r simple and nested BasicBlocks, floating-point return values of functions.

TODO: Import OpenCV library to Cmake build. Implement special calling conventions for 32bit architecture.
# Conflicts:
#	src/capstone2llvmir/x86/x86.cpp
#	src/config/calling_convention.cpp
#	tests/capstone2llvmir/x86_tests.cpp
…brary is used to math computation with matricies for X86 FPU analyze optimization.
JurajHolub and others added 11 commits February 24, 2020 09:59
…tion. Optimization now validate value of FPU top at the end of every terminating block and detects unsupported states.
…e bugs when TOP is changed but not stored etc.
…w tests - fix bugs revealed by integration tests analyze.
…n testing and improve performance of this optimization.
…nalysis

# Conflicts:
#	include/retdec/bin2llvmir/optimizations/x87_fpu/x87_fpu.h
#	src/bin2llvmir/optimizations/x87_fpu/x87_fpu.cpp
#	tests/bin2llvmir/optimizations/x87_fpu/x87_fpu_test.cpp
@JurajHolub
Copy link
Contributor Author

Actual state fixes previous bugs but the Eigen library is still included in the sources. As soon as possible, I change it to project dependency to install.

JurajHolub and others added 4 commits March 31, 2020 14:13
…cture because this feature has depreaced due to unacceptable performance lack.
…e of algorithm. Replace SVD decomposition for QR decomosition due to performance increase. Fix includes for eigen library that is now external project. Optimize matrix rank calculation.
@PeterMatula
Copy link
Collaborator

Run TeamCity builds.

@PeterMatula
Copy link
Collaborator

run tc tests

@PeterMatula PeterMatula merged commit 2183f84 into avast:master May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants