Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: src/arm/assembler-arm.h

Issue 1307863007: Revert of [arm] Decrease the size of the assembler class by allocating buffers of pending constants on the he… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 static int DecodeShiftImm(Instr instr); 1458 static int DecodeShiftImm(Instr instr);
1459 static Instr PatchShiftImm(Instr instr, int immed); 1459 static Instr PatchShiftImm(Instr instr, int immed);
1460 1460
1461 // Constants in pools are accessed via pc relative addressing, which can 1461 // Constants in pools are accessed via pc relative addressing, which can
1462 // reach +/-4KB for integer PC-relative loads and +/-1KB for floating-point 1462 // reach +/-4KB for integer PC-relative loads and +/-1KB for floating-point
1463 // PC-relative loads, thereby defining a maximum distance between the 1463 // PC-relative loads, thereby defining a maximum distance between the
1464 // instruction and the accessed constant. 1464 // instruction and the accessed constant.
1465 static const int kMaxDistToIntPool = 4*KB; 1465 static const int kMaxDistToIntPool = 4*KB;
1466 static const int kMaxDistToFPPool = 1*KB; 1466 static const int kMaxDistToFPPool = 1*KB;
1467 // All relocations could be integer, it therefore acts as the limit. 1467 // All relocations could be integer, it therefore acts as the limit.
1468 static const int kMinNumPendingConstants = 4;
1469 static const int kMaxNumPending32Constants = kMaxDistToIntPool / kInstrSize; 1468 static const int kMaxNumPending32Constants = kMaxDistToIntPool / kInstrSize;
1470 static const int kMaxNumPending64Constants = kMaxDistToFPPool / kInstrSize; 1469 static const int kMaxNumPending64Constants = kMaxDistToFPPool / kInstrSize;
1471 1470
1472 // Postpone the generation of the constant pool for the specified number of 1471 // Postpone the generation of the constant pool for the specified number of
1473 // instructions. 1472 // instructions.
1474 void BlockConstPoolFor(int instructions); 1473 void BlockConstPoolFor(int instructions);
1475 1474
1476 // Check if is time to emit a constant pool. 1475 // Check if is time to emit a constant pool.
1477 void CheckConstPool(bool force_emit, bool require_jump); 1476 void CheckConstPool(bool force_emit, bool require_jump);
1478 1477
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 RelocInfoWriter reloc_info_writer; 1591 RelocInfoWriter reloc_info_writer;
1593 1592
1594 // ConstantPoolEntry records are used during code generation as temporary 1593 // ConstantPoolEntry records are used during code generation as temporary
1595 // containers for constants and code target addresses until they are emitted 1594 // containers for constants and code target addresses until they are emitted
1596 // to the constant pool. These records are temporarily stored in a separate 1595 // to the constant pool. These records are temporarily stored in a separate
1597 // buffer until a constant pool is emitted. 1596 // buffer until a constant pool is emitted.
1598 // If every instruction in a long sequence is accessing the pool, we need one 1597 // If every instruction in a long sequence is accessing the pool, we need one
1599 // pending relocation entry per instruction. 1598 // pending relocation entry per instruction.
1600 1599
1601 // The buffers of pending constant pool entries. 1600 // The buffers of pending constant pool entries.
1602 ConstantPoolEntry pending_32_bit_constants_buffer_[kMinNumPendingConstants]; 1601 ConstantPoolEntry pending_32_bit_constants_[kMaxNumPending32Constants];
1603 ConstantPoolEntry pending_64_bit_constants_buffer_[kMinNumPendingConstants]; 1602 ConstantPoolEntry pending_64_bit_constants_[kMaxNumPending64Constants];
1604 ConstantPoolEntry* pending_32_bit_constants_;
1605 ConstantPoolEntry* pending_64_bit_constants_;
1606 // Number of pending constant pool entries in the 32 bits buffer. 1603 // Number of pending constant pool entries in the 32 bits buffer.
1607 int num_pending_32_bit_constants_; 1604 int num_pending_32_bit_constants_;
1608 // Number of pending constant pool entries in the 64 bits buffer. 1605 // Number of pending constant pool entries in the 64 bits buffer.
1609 int num_pending_64_bit_constants_; 1606 int num_pending_64_bit_constants_;
1610 1607
1611 ConstantPoolBuilder constant_pool_builder_; 1608 ConstantPoolBuilder constant_pool_builder_;
1612 1609
1613 // The bound position, before this we cannot do instruction elimination. 1610 // The bound position, before this we cannot do instruction elimination.
1614 int last_bound_pos_; 1611 int last_bound_pos_;
1615 1612
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 public: 1652 public:
1656 explicit EnsureSpace(Assembler* assembler) { 1653 explicit EnsureSpace(Assembler* assembler) {
1657 assembler->CheckBuffer(); 1654 assembler->CheckBuffer();
1658 } 1655 }
1659 }; 1656 };
1660 1657
1661 1658
1662 } } // namespace v8::internal 1659 } } // namespace v8::internal
1663 1660
1664 #endif // V8_ARM_ASSEMBLER_ARM_H_ 1661 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698