diff options
author | Vladimir Marko <vmarko@google.com> | 2015-06-16 11:33:24 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2015-06-17 09:43:51 +0100 |
commit | cf93a5cd9c978f59113d42f9f642fab5e2cc8877 (patch) | |
tree | 55162627fcbf2cb7913a735c7ed89e8e4b5e84d7 /compiler/utils/assembler.cc | |
parent | db40ea768bd914125c3754dacb9b6f534a2e2399 (diff) |
Revert "Revert "ART: Implement literal pool for arm, fix branch fixup.""
This reverts commit fbeb4aede0ddc5b1e6a5a3a40cc6266fe8518c98.
Adjust block label positions. Bad catch block labels were the
reason for the revert.
Change-Id: Ia6950d639d46b9da6b07f3ade63ab46d03d63310
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); |