summaryrefslogtreecommitdiff
path: root/compiler/utils/arm/assembler_thumb2.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2015-11-19 21:13:52 +0000
committer Vladimir Marko <vmarko@google.com> 2015-11-20 11:55:49 +0000
commit6fd0ffe8da212723a3ac0256ce350b5872cc61d4 (patch)
tree122c89d874460662d3feba523cb9f2553fb78bd3 /compiler/utils/arm/assembler_thumb2.h
parentbeb709a2607a00b5df33f0235f22ccdd876cee22 (diff)
Optimizing/Thumb2: Improve load/store for large offsets.
This reduces the boot.oat size on Nexus 5 by 568KiB (0.8%). Also change 32-bit ADD/SUB immediate to use the recommended encoding T3 when both T3 and T4 are available. Change-Id: I174382bda2b22da70560b947f5536acf8c1814a9
Diffstat (limited to 'compiler/utils/arm/assembler_thumb2.h')
-rw-r--r--compiler/utils/arm/assembler_thumb2.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/compiler/utils/arm/assembler_thumb2.h b/compiler/utils/arm/assembler_thumb2.h
index e18361300a..9aeece8e57 100644
--- a/compiler/utils/arm/assembler_thumb2.h
+++ b/compiler/utils/arm/assembler_thumb2.h
@@ -729,13 +729,23 @@ class Thumb2Assembler FINAL : public ArmAssembler {
void EmitBranch(Condition cond, Label* label, bool link, bool x);
static int32_t EncodeBranchOffset(int32_t offset, int32_t inst);
static int DecodeBranchOffset(int32_t inst);
- int32_t EncodeTstOffset(int offset, int32_t inst);
- int DecodeTstOffset(int32_t inst);
void EmitShift(Register rd, Register rm, Shift shift, uint8_t amount,
Condition cond = AL, SetCc set_cc = kCcDontCare);
void EmitShift(Register rd, Register rn, Shift shift, Register rm,
Condition cond = AL, SetCc set_cc = kCcDontCare);
+ static int32_t GetAllowedLoadOffsetBits(LoadOperandType type);
+ static int32_t GetAllowedStoreOffsetBits(StoreOperandType type);
+ bool CanSplitLoadStoreOffset(int32_t allowed_offset_bits,
+ int32_t offset,
+ /*out*/ int32_t* add_to_base,
+ /*out*/ int32_t* offset_for_load_store);
+ int32_t AdjustLoadStoreOffset(int32_t allowed_offset_bits,
+ Register temp,
+ Register base,
+ int32_t offset,
+ Condition cond);
+
// Whether the assembler can relocate branches. If false, unresolved branches will be
// emitted on 32bits.
bool can_relocate_branches_;