quarkslab / arybo

Manipulation, canonicalization and identification of mixed boolean-arithmetic symbolic expressions
BSD 3-Clause "New" or "Revised" License
300 stars 35 forks source link

tritonast2arybo: unsupported node type 79 (BVSMOD) #26

Open dvcrn opened 4 years ago

dvcrn commented 4 years ago

Trying to go from Triton AST to LLVM IR by running some examples but getting unsupported node type 79 for BVSMOD

Is it possible to support this in arybo or is there a workaround?

dvcrn commented 4 years ago

I copied some code from TritonASTLLVMIRTranslator to arybo to hotfix-fix this:

def glue_for_bvsmod(lhs, rhs):
    srem = lhs.srem(rhs)
    add = srem.__add__(rhs)
    return add.srem(rhs)

I wanted to submit a PR but the testsuite for the triton part is very outdated so bumping it to work with the most recent Triton takes a bit more time