Chromium Code Reviews| Index: src/arm/assembler-arm.cc |
| diff --git a/src/arm/assembler-arm.cc b/src/arm/assembler-arm.cc |
| index b90ff1e05b6a383cbf40276af1e762b20ebd2635..bad319b0ad270b96f3cfd4fecf78760bd953e57d 100644 |
| --- a/src/arm/assembler-arm.cc |
| +++ b/src/arm/assembler-arm.cc |
| @@ -3785,6 +3785,9 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) { |
| RecordComment("[ Constant Pool"); |
| RecordConstPool(size); |
| + Label size_check; |
| + bind(&size_check); |
| + |
| // Emit jump over constant pool if necessary. |
| Label after_pool; |
| if (require_jump) { |
| @@ -3814,27 +3817,9 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) { |
| int delta = pc_offset() - entry.position() - kPcLoadDelta; |
| DCHECK(is_uint10(delta)); |
| - |
| - bool found = false; |
| - uint64_t value = entry.value64(); |
| - for (int j = 0; j < i; j++) { |
| - ConstantPoolEntry& entry2 = pending_64_bit_constants_[j]; |
| - if (value == entry2.value64()) { |
| - found = true; |
| - Instr instr2 = instr_at(entry2.position()); |
| - DCHECK(IsVldrDPcImmediateOffset(instr2)); |
| - delta = GetVldrDRegisterImmediateOffset(instr2); |
| - delta += entry2.position() - entry.position(); |
| - break; |
| - } |
| - } |
| - |
| instr_at_put(entry.position(), |
| SetVldrDRegisterImmediateOffset(instr, delta)); |
| - |
| - if (!found) { |
| - dq(entry.value64()); |
| - } |
| + dq(entry.value64()); |
| } |
| // Emit 32-bit constant pool entries. |
| @@ -3853,30 +3838,9 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) { |
| // ldr rd, [pc, #0] |
| // constant pool marker |
| // data |
| - |
| - bool found = false; |
| - if (entry.sharing_ok()) { |
| - for (int j = 0; j < i; j++) { |
|
rmcilroy
2015/07/02 13:59:48
By removing this sharing you are going to increase
|
| - ConstantPoolEntry& entry2 = pending_32_bit_constants_[j]; |
| - |
| - if (entry2.value() == entry.value()) { |
| - Instr instr2 = instr_at(entry2.position()); |
| - if (IsLdrPcImmediateOffset(instr2)) { |
| - delta = GetLdrRegisterImmediateOffset(instr2); |
| - delta += entry2.position() - entry.position(); |
| - found = true; |
| - break; |
| - } |
| - } |
| - } |
| - } |
| - |
| instr_at_put(entry.position(), |
| SetLdrRegisterImmediateOffset(instr, delta)); |
| - |
| - if (!found) { |
| - emit(entry.value()); |
| - } |
| + emit(entry.value()); |
| } else { |
| DCHECK(IsMovW(instr)); |
| } |
| @@ -3889,6 +3853,8 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) { |
| RecordComment("]"); |
| + DCHECK_EQ(size, SizeOfCodeGeneratedSince(&size_check)); |
| + |
| if (after_pool.is_linked()) { |
| bind(&after_pool); |
| } |