bddisasm is a fast, lightweight, x86/x64 instruction decoder. The project also features a fast, basic, x86/x64 instruction emulator, designed specifically to detect shellcode-like behavior.
I replaced __forceinline with inline. mingwcomplains when it encounteres static __forceinline and ifdefing this problem away is an ugly solution.
__forceinline was used on 4 functions: NdGetVectorLength, NdGetAddrAndOpMode, NdGetEffectiveOpMode, and NdValidateInstruction - all called only once from NdDecodeWithContext. The first 2 functions are still inlined on 64-bit MSVC Release builds, but the other 2 are not. This should not have a negative impact.
For Linux builds, using clang, only NdGetAddrAndOpMode and NdGetEffectiveOpMode seem to be inlined.
This should fix #77.
I replaced
__forceinline
withinline
.mingw
complains when it encounteresstatic __forceinline
andifdef
ing this problem away is an ugly solution.__forceinline
was used on 4 functions:NdGetVectorLength
,NdGetAddrAndOpMode
,NdGetEffectiveOpMode
, andNdValidateInstruction
- all called only once fromNdDecodeWithContext
. The first 2 functions are still inlined on 64-bit MSVC Release builds, but the other 2 are not. This should not have a negative impact.For Linux builds, using
clang
, onlyNdGetAddrAndOpMode
andNdGetEffectiveOpMode
seem to be inlined.