From f16600bd3676f098567f723602f02dd013af178c Mon Sep 17 00:00:00 2001 From: buzbee Date: Thu, 2 Feb 2012 18:19:29 -0800 Subject: 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 --- src/compiler/codegen/arm/Assemble.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/compiler/codegen/arm') 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; -- cgit v1.2.3-59-g8ed1b