summaryrefslogtreecommitdiffstats
path: root/test/134-reg-promotion
Commit message (Collapse)AuthorAgeFilesLines
* Quick: Create GC map based on compiler data.Vladimir Marko2015-03-202-0/+31
| | | | | | | | | | | | | | | | | | | | | | | The Quick compiler and verifier sometimes disagree on dalvik register types (fp/core/ref) for 0/null constants and merged registers involving 0/null constants. Since the verifier is more lenient it can mark a register as a reference for GC where Quick considers it a floating point register or a dead register (which would have a ref/fp conflict if not dead). If the compiler used an fp register to hold the zero value, the core register or stack location used by GC based on the verifier data can hold an invalid value. Previously, as a workaround we stored the fp zero value also in the stack location or core register where GC would look for it. This wasn't precise and may have missed some cases. To fix this properly, we now generate GC maps based on the compiler's notion of references if register promotion is enabled. Bug: https://code.google.com/p/android/issues/detail?id=147187 Change-Id: Id3a2f863b16bdb8969df7004c868773084aec421
* Handle another untyped dex CONST issuebuzbee2015-02-224-0/+84
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