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

Unified Diff: src/platform-posix.cc

Issue 14365011: OS::MemMove/OS::MemCopy: Don't call through to generated code when size == 0 to avoid prefetching i… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/platform-win32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index 48898ed9aad0acdb4cc06ccba4b01c9818f26de4..9f650d1e5b5c3b7bcad6ee53fc2b8921cad7580a 100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -334,6 +334,7 @@ OS::MemMoveFunction CreateMemMoveFunction();
// Copy memory area. No restrictions.
void OS::MemMove(void* dest, const void* src, size_t size) {
+ if (size == 0) return;
// Note: here we rely on dependent reads being ordered. This is true
// on all architectures we currently support.
(*memmove_function)(dest, src, size);
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698