diff options
author | buzbee <buzbee@google.com> | 2012-11-30 06:46:45 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2012-11-30 14:48:08 -0800 |
commit | c83353bc0d7ddfedd3bc06fdb12f25710191e1e6 (patch) | |
tree | 13e0b60b68090a0355bdd4fd486a8462d8bb7f95 /vm/compiler/codegen/arm/Assemble.cpp | |
parent | c375ac332911cfea8e6570e2681cf79ad5220edb (diff) | |
download | android_dalvik-c83353bc0d7ddfedd3bc06fdb12f25710191e1e6.tar.gz android_dalvik-c83353bc0d7ddfedd3bc06fdb12f25710191e1e6.tar.bz2 android_dalvik-c83353bc0d7ddfedd3bc06fdb12f25710191e1e6.zip |
JIT: Performance fix for const doubles
Some recent Arm processors take a performance hit when
creating a floating point double by loading it as a pair of singles.
Legacy code to support soft floating point doubles as a pair of core
registers loaded double immediates in this way.
With the CL, we handle double immediates as a single unit.
(cherry-pick of c8129911e598ad0ca8d7b31012444ab6ce8bce45.)
Change-Id: Ic1512e34bfd233a6f5ffd58ce843965adbbad875
Diffstat (limited to 'vm/compiler/codegen/arm/Assemble.cpp')
-rw-r--r-- | vm/compiler/codegen/arm/Assemble.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vm/compiler/codegen/arm/Assemble.cpp b/vm/compiler/codegen/arm/Assemble.cpp index d1ecd9756..7406d3e88 100644 --- a/vm/compiler/codegen/arm/Assemble.cpp +++ b/vm/compiler/codegen/arm/Assemble.cpp @@ -952,6 +952,7 @@ static AssemblerStatus assembleInstructions(CompilationUnit *cUnit, if (lir->opcode == kThumbLdrPcRel || lir->opcode == kThumb2LdrPcRel12 || lir->opcode == kThumbAddPcRel || + ((lir->opcode == kThumb2Vldrd) && (lir->operands[1] == r15pc)) || ((lir->opcode == kThumb2Vldrs) && (lir->operands[1] == r15pc))) { ArmLIR *lirTarget = (ArmLIR *) lir->generic.target; intptr_t pc = (lir->generic.offset + 4) & ~3; @@ -976,7 +977,7 @@ static AssemblerStatus assembleInstructions(CompilationUnit *cUnit, } return kRetryHalve; } - if (lir->opcode == kThumb2Vldrs) { + if ((lir->opcode == kThumb2Vldrs) || (lir->opcode == kThumb2Vldrd)) { lir->operands[2] = delta >> 2; } else { lir->operands[1] = (lir->opcode == kThumb2LdrPcRel12) ? |