diff options
author | Vladimir Marko <vmarko@google.com> | 2015-05-29 15:50:18 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2015-06-15 15:13:28 +0100 |
commit | f38caa68cce551fb153dff37d01db518e58ed00f (patch) | |
tree | 723612f20666f429b7c67321f0353d57425b1c63 /compiler/utils/assembler.cc | |
parent | bd8c725e465cc7f44062745a6f2b73248f5159ed (diff) |
ART: Implement literal pool for arm, fix branch fixup.
Change-Id: Iecc91418bb4ee1c957f42fefb737d0ee2ba960e7
Diffstat (limited to 'compiler/utils/assembler.cc')
-rw-r--r-- | compiler/utils/assembler.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/utils/assembler.cc b/compiler/utils/assembler.cc index b016e74aba..6d8a98931f 100644 --- a/compiler/utils/assembler.cc +++ b/compiler/utils/assembler.cc @@ -80,10 +80,11 @@ void AssemblerBuffer::FinalizeInstructions(const MemoryRegion& instructions) { } -void AssemblerBuffer::ExtendCapacity() { +void AssemblerBuffer::ExtendCapacity(size_t min_capacity) { size_t old_size = Size(); size_t old_capacity = Capacity(); size_t new_capacity = std::min(old_capacity * 2, old_capacity + 1 * MB); + new_capacity = std::max(new_capacity, min_capacity); // Allocate the new data area and copy contents of the old one to it. uint8_t* new_contents = NewContents(new_capacity); |