Fix overlap bug
There is currently no rule against a dex code pattern that
overlaps the result of a long operation with the source operands.
ADD_LONG v1, v9, v0
is: (v1,v2) = (v9, v10) + (v0, v1)
However, dx appears to never generate such a pattern. This masked
a JIT (and later Art) bug in the handling of long arithmetic code
generation. The above code expands into a pair of 32-bit add
operations and naively kills the high-order word of the 2nd
operation while computing the low-order word of the result.
The fix is simple - detect this case and use an intermediate
1 file changed