Index: src/mips64/assembler-mips64.h |
diff --git a/src/mips64/assembler-mips64.h b/src/mips64/assembler-mips64.h |
index 74a3204c2c8930b8647cae95913f08c24f71df5d..3c0e834c3743a74bb7f4f5dc529f464943497f2b 100644 |
--- a/src/mips64/assembler-mips64.h |
+++ b/src/mips64/assembler-mips64.h |
@@ -1976,6 +1976,9 @@ class Assembler : public AssemblerBase { |
inline void CheckTrampolinePoolQuick(int extra_instructions = 0); |
private: |
+ // Avoid overflows for displacements etc. |
+ static const int kMaximalBufferSize = 512 * MB; |
+ |
// Buffer size and constant pool distance are checked together at regular |
// intervals of kBufferCheckInterval emitted bytes. |
static constexpr int kBufferCheckInterval = 1 * KB / 2; |