summaryrefslogtreecommitdiff
path: root/src/compiler/codegen
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2012-02-02 18:19:29 -0800
committer buzbee <buzbee@google.com> 2012-02-02 18:19:29 -0800
commitf16600bd3676f098567f723602f02dd013af178c (patch)
tree184cc070ee6ee515e36096d19f1db8eb9dba399f /src/compiler/codegen
parent054f6c19573100b29ce4139822bb496ba3d8e4d0 (diff)
Minor compiler tuning.
Assembling is an iterative process because we don't know final code offsets until the end (and they can change during assembly). Avoid some unnecessary work on assembly passes that must be redone. Small, but measurable, improvement. Change-Id: I42b48e4be6d9364bc0dfc290c4e711d264e4ab52
Diffstat (limited to 'src/compiler/codegen')
-rw-r--r--src/compiler/codegen/arm/Assemble.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/codegen/arm/Assemble.cc b/src/compiler/codegen/arm/Assemble.cc
index 685dd4c645..f270631e0d 100644
--- a/src/compiler/codegen/arm/Assemble.cc
+++ b/src/compiler/codegen/arm/Assemble.cc
@@ -1337,6 +1337,14 @@ STATIC AssemblerStatus assembleInstructions(CompilationUnit* cUnit,
(addPCInst->generic.offset + 4)) >> 16) & 0xffff;
}
}
+ /*
+ * If one of the pc-relative instructions expanded we'll have
+ * to make another pass. Don't bother to fully assemble the
+ * instruction.
+ */
+ if (res != kSuccess) {
+ continue;
+ }
ArmEncodingMap *encoder = &EncodingMap[lir->opcode];
u4 bits = encoder->skeleton;
int i;