dslab-epfl/s2e — pull request #66 by moyix (2014-02-09 18:43:44+00:00)
Title: Fix LLVM implementation of TCG op_div2

The LLVM code implementing `op_div2` and `op_divu2` was broken: the dividend was `bits*2` wide but the divisor was only `bits` wide. This fixes the problem by extending the divisor and then truncating the quotient.

In addition, an incorrect use of `#ifdef TCG_TARGET_HAS_div_i32` was fixed (`TCG_TARGET_HAS_div_i32` is always defined but may be 0 or 1).