Handle another untyped dex CONST issue

The lack of typing for dex byte code instructions causes problems
for the Quick compiler's register allocation scheme.  In Quick,
Dalvik virtual registers can have multiple "home locations" depending
on type.  Because CONST operators are untyped and their result can
be used in multiple type contexts, the code generator must ensure
that any CONST #0 definitions of potential floating point uses
are also flushed to the associated reference view for the vreg
(if it exists) to support GC.  Previously, this issue was believed
to have been fixed by c/255389 (see internal b/7250540).

However, the earlier fix failed to account for const definitions
propogating to other vregs via MOVE.  This CL addresses that case by
applying the earlier workaround to MOVE operators.

Note that there are a few other places where we attempt to deal
with this general problem.  First, the verifier will disable
compilation for dex code sequences which have type mismatches on non-const
operations.  Second, during vreg analysis we detect type mismatches on
Phi insertion, and disable register promotion if there is a mismatch.

b.android.com/147187

Change-Id: I70f27a59e6f84a89777db91ceacaa94a42f5e952
5 files changed