| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | |
|
| | |/ |
|
| |\ \
| | |
| | | |
Jitter/llvm: Fix llvm Memory lookup cache
|
| | | | |
|
| |\ \ \
| | | |
| | | | |
Fix dot 'w' open
|
| | | |/
| |/| |
|
| |\ \ \
| |/ /
|/| | |
Fix semantics of REP prefix.
|
| |/ /
| |
| |
| |
| |
| |
| | |
Only REPE and REPNE exist at the binary level, but Miasm allows "REP" when
assembling x86 instructions. Make the semantics aware of this instead
of ignoring the REP prefix.
The bug could not occur when disassembling a binary program.
|
| |\ \
| |/
|/| |
sembuilder: more compatible way to construct AST module
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Python3.8 changes the signature of ast.Module by adding a
ignore_comment field which breaks this project. ast.parse("")
is a dirty but more compatible way to make it work in both
Python 3.8 and <3.8.
Fixed #1092
|
| |\ \
| | |
| | | |
Jitter/Windows: less verbose exceptions
|
| |/ / |
|
| |\ \
| | |
| | | |
Path are str
|
| | | | |
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
get_str_ansi decoded strings using utf8 and was blindly used for pure
windows function (LoadLibraryA) and for stdlib functions (printf,
strlen, ...) even if strlen does not use utf8...
New API is:
get_win_str_a/get_win_str_w and set_win_str_a/set_win_str_w for
windows (respectively codepage1252/windows utf16) .Those functions
should only be used in windows strings manipulations, so there are taken
out of the jitter.
get_c_str/set_c_str: as those functions are "classic" in OSes, they are
keeped in the jitter.
|
| |\ \
| | |
| | | |
Aarch64: add ldarb
|
| | | | |
|
| |\ \ \
| |/ /
|/| | |
Remove non working/useless api from ircfg
|
| |/ / |
|
| |\ \
| | |
| | | |
doc: moved the "what" at the top
|
| |/ / |
|
| |\ \
| | |
| | | |
Adds a missing import
|
| |/ / |
|
| |\ \
| | |
| | | |
Loader: avoid None dst_ad in lib_imp2dstad
|
| | | | |
|
| |\ \ \
| |/ /
|/| | |
Fix python2/python3 bytes manipulation
|
| |/ / |
|
| |\ \
| | |
| | | |
X86/sem: fix tipo during python2/3 updt
|
| | | | |
|
| |\ \ \
| | | |
| | | | |
Jitter: android support
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Furthermore this macro is already declared in android and thus generates a
warning.
|
| | | | | |
|
| |\ \ \ \
| |/ / /
|/| | | |
Jitter: remove Clang warnings
|
| |/ / / |
|
| |\ \ \
| | | |
| | | | |
Avoid deprecation warning
|
| |/ / / |
|
| |\ \ \
| | | |
| | | | |
Fix IDA depgraph example
|
| | |/ / |
|
| |\ \ \
| | | |
| | | | |
Add roundss/roundsd
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change adds three new ops for rounding:
- 'fpround_towardsnearest': rounds to nearest int, even for ties
- 'fpround_down': rounds to nearest int <= float
- 'fpround_up': rounds to nearest int >= float
- 'fpround_towardszero'(existing): rounds to nearest int s.t. |int| <=
|float|
For a variant of roundsd that uses mxcsr register as the rounding mode,
currently we assume it's fpround_towardsnearest. This may cause trouble
if the program modifies MXCSR register.
Tested:
$ objdump -dSC rounds.so
0000000000001000 <entry>:
1000: 66 0f 3a 0b c0 01 roundsd $0x1,%xmm0,%xmm0
1006: 66 0f 3a 0a c0 0c roundss $0xc,%xmm0,%xmm0
100c: c3 retq
$ cat test.py
from miasm.analysis.binary import *
from miasm.analysis.machine import Machine
from miasm.expression.simplifications import expr_simp
with open('rounds.so', 'rb') as f:
cont = ContainerELF.from_stream(f)
machine = Machine(cont.arch)
mdis = machine.dis_engine(cont.bin_stream, loc_db=cont.loc_db)
asmcfg = mdis.dis_multiblock(cont.loc_db.get_name_offset('entry'))
ir = machine.ir(asmcfg.loc_db)
ircfg = ir.new_ircfg_from_asmcfg(asmcfg)
ircfg.simplify(expr_simp)
print(ircfg.blocks[ircfg.heads()[0]].to_string())
$ python test.py
loc_key_0:
XMM0 = {fpround_down(XMM0[0:64]) 0 64, XMM0[64:128] 64 128}
XMM0 = {fpround_towardsnearest(XMM0[0:32]) 0 32, XMM0[32:128] 32 128}
RSP = RSP + 0x8
RIP = @64[RSP]
IRDst = @64[RSP]
|
| | | |/
| |/| |
|
| |\ \ \
| |/ /
|/| | |
arch: x86: make UD2 break control flow
|
| |/ / |
|
| |\ \
| |/
|/| |
fix int 1 handling
|
| |/ |
|
| |\
| |
| | |
Add a few PPC32 tests
|
| | | |
|
| |/ |
|
| |\
| |
| | |
modify CreateFile to open file in binary-mode
|
| |/ |
|