From: akos.palfi@imgtec.com Date: Wed, 6 Aug 2014 19:30:03 +0000 (+0000) Subject: MIPS: We should never allocate a 0-sized buffer, so never grow from 0. X-Git-Tag: upstream/4.7.83~7763 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=957e1b3897e8a076fd9cb4b540976efe9de395e5;p=platform%2Fupstream%2Fv8.git MIPS: We should never allocate a 0-sized buffer, so never grow from 0. Port r22947 (e72b5aed) and r22944 (d1d8f44c) BUG= R=paul.lind@imgtec.com Review URL: https://codereview.chromium.org/446923003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc index e959b41..936a73b 100644 --- a/src/mips/assembler-mips.cc +++ b/src/mips/assembler-mips.cc @@ -1974,9 +1974,7 @@ void Assembler::GrowBuffer() { // Compute new buffer size. CodeDesc desc; // The new buffer. - if (buffer_size_ < 4*KB) { - desc.buffer_size = 4*KB; - } else if (buffer_size_ < 1*MB) { + if (buffer_size_ < 1 * MB) { desc.buffer_size = 2*buffer_size_; } else { desc.buffer_size = buffer_size_ + 1*MB; diff --git a/src/mips64/assembler-mips64.cc b/src/mips64/assembler-mips64.cc index bc61695..36e9c2d 100644 --- a/src/mips64/assembler-mips64.cc +++ b/src/mips64/assembler-mips64.cc @@ -2631,9 +2631,7 @@ void Assembler::GrowBuffer() { // Compute new buffer size. CodeDesc desc; // The new buffer. - if (buffer_size_ < 4*KB) { - desc.buffer_size = 4*KB; - } else if (buffer_size_ < 1*MB) { + if (buffer_size_ < 1 * MB) { desc.buffer_size = 2*buffer_size_; } else { desc.buffer_size = buffer_size_ + 1*MB;