diff options
author | buzbee <buzbee@google.com> | 2012-11-30 06:46:45 -0800 |
---|---|---|
committer | buzbee <buzbee@google.com> | 2012-11-30 12:21:43 -0800 |
commit | c8129911e598ad0ca8d7b31012444ab6ce8bce45 (patch) | |
tree | ecb49da68ba80edaa0ece59f835f9ebd3295c0d4 /vm/compiler/codegen/arm/Assemble.cpp | |
parent | 436d13bf317ceaa28bd2a5ea0483f956f0082413 (diff) | |
download | android_dalvik-c8129911e598ad0ca8d7b31012444ab6ce8bce45.tar.gz android_dalvik-c8129911e598ad0ca8d7b31012444ab6ce8bce45.tar.bz2 android_dalvik-c8129911e598ad0ca8d7b31012444ab6ce8bce45.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.
Change-Id: I91aca9da6d4b38e180479dd8f75c82dbc7b4a526
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) ? |