commit | 7debb9113af41a38a6f5ecbda1a2c28c5e5a17af | [log] [tgz] |
---|---|---|
author | jeffhao <jeffhao@google.com> | Fri Aug 26 15:01:11 2011 -0700 |
committer | jeffhao <jeffhao@google.com> | Fri Aug 26 15:43:03 2011 -0700 |
tree | 547df6e9fd59022d8f67e287a9a410112e6cee0d | |
parent | 36db01eeaa04e3af3401c5bd6a399d3fb7b040e3 [diff] |
Dx reg allocator fix for accidental long/double clobbering. Addresses this bug: http://b/issue?id=5215643. Change-Id: I82613c38b0a6247d071aa6c5cc90bf8b60d5d84b
diff --git a/dx/src/com/android/dx/ssa/back/FirstFitLocalCombiningAllocator.java b/dx/src/com/android/dx/ssa/back/FirstFitLocalCombiningAllocator.java index ed82a31..9ef95a7 100644 --- a/dx/src/com/android/dx/ssa/back/FirstFitLocalCombiningAllocator.java +++ b/dx/src/com/android/dx/ssa/back/FirstFitLocalCombiningAllocator.java
@@ -1039,7 +1039,9 @@ for (int i = 0; i < sourcesSize; i++) { RegisterSpec source = sources.get(i); - int sourceReg = source.getReg(); + SsaInsn def = ssaMeth.getDefinitionForRegister(source.getReg()); + RegisterSpec sourceDef = def.getResult(); + int sourceReg = sourceDef.getReg(); /* * If a source of the phi has an existing mapping, get it. @@ -1048,7 +1050,7 @@ if (ssaRegsMapped.get(sourceReg)) { mapSet.add(mapper.oldToNew(sourceReg)); } else { - ssaRegs.add(source); + ssaRegs.add(sourceDef); } }