diff options
author | buzbee <buzbee@google.com> | 2013-02-11 16:52:31 -0800 |
---|---|---|
committer | buzbee <buzbee@google.com> | 2013-02-11 16:52:31 -0800 |
commit | c1757a6deab0ca0bfd42c38612d92b2f26c41dbe (patch) | |
tree | 6229b8839c4d3ff9f3a0243eca51711dfc503021 /vm/compiler/codegen/arm | |
parent | 984d13eb2f20513d175c8b31372bd2b40d2d95f3 (diff) | |
download | android_dalvik-c1757a6deab0ca0bfd42c38612d92b2f26c41dbe.tar.gz android_dalvik-c1757a6deab0ca0bfd42c38612d92b2f26c41dbe.tar.bz2 android_dalvik-c1757a6deab0ca0bfd42c38612d92b2f26c41dbe.zip |
Fix JIT bug related to immediate doubles
Change 256211 (JIT: Performance Fix for const doubles) introduced a
defect that can cause the JIT to use the wrong floating point
double constant in traces in which the following conditions hold:
o Two (or more) different 64-bit floating point constants are used.
o The physical register holding the first constant is still live
at the time the second constant is used.
o The low 32 bits of the two constants are identical.
In this situation, the load/copy optimization pass will incorrectly
determine that the two constants are the same, delete the load of
the second constant and re-use the first constant value.
Note: this problem only occurs with 64-bit floating point literals.
64-bit long literals are unaffected.
This CL works around the problem, and a subsequent CL will rework
disambiguation of 64-bit immediates in a somewhat cleaner fashion.
Change-Id: I33baf78402bab58d9b0ca46189f26491c2b2a751
Diffstat (limited to 'vm/compiler/codegen/arm')
-rw-r--r-- | vm/compiler/codegen/arm/Thumb2/Factory.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vm/compiler/codegen/arm/Thumb2/Factory.cpp b/vm/compiler/codegen/arm/Thumb2/Factory.cpp index c3c37128c..b9265e823 100644 --- a/vm/compiler/codegen/arm/Thumb2/Factory.cpp +++ b/vm/compiler/codegen/arm/Thumb2/Factory.cpp @@ -727,7 +727,8 @@ static ArmLIR *loadConstantValueWide(CompilationUnit *cUnit, int rDestLo, loadPcRel->operands[1] = r15pc; setupResourceMasks(loadPcRel); setMemRefType(loadPcRel, true, kLiteral); - loadPcRel->aliasInfo = dataTarget->operands[0]; + // TODO: rework literal load disambiguation to more cleanly handle 64-bit loads + loadPcRel->aliasInfo = (uintptr_t)dataTarget; dvmCompilerAppendLIR(cUnit, (LIR *) loadPcRel); res = loadPcRel; } |