Revision: 10521
Author:   [email protected]
Date:     Thu Jan 26 09:20:12 2012
Log: Merge 10518 into 3.7. This adds an Android-specific version of cacheflush call.
Review URL: https://chromiumcodereview.appspot.com/9235064
http://code.google.com/p/v8/source/detail?r=10521

Modified:
 /branches/3.7/src/mips/cpu-mips.cc
 /branches/3.7/src/version.cc

=======================================
--- /branches/3.7/src/mips/cpu-mips.cc  Wed May 11 04:54:09 2011
+++ /branches/3.7/src/mips/cpu-mips.cc  Thu Jan 26 09:20:12 2012
@@ -1,4 +1,4 @@
-// Copyright 2011 the V8 project authors. All rights reserved.
+// Copyright 2012 the V8 project authors. All rights reserved.
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are
 // met:
@@ -64,15 +64,19 @@
   }

 #if !defined (USE_SIMULATOR)
+#if defined(ANDROID)
+  // Bionic cacheflush can typically run in userland, avoiding kernel call.
+  char *end = reinterpret_cast<char *>(start) + size;
+  cacheflush(
+    reinterpret_cast<intptr_t>(start), reinterpret_cast<intptr_t>(end), 0);
+#else  // ANDROID
   int res;
-
   // See http://www.linux-mips.org/wiki/Cacheflush_Syscall.
   res = syscall(__NR_cacheflush, start, size, ICACHE);
-
   if (res) {
     V8_Fatal(__FILE__, __LINE__, "Failed to flush the instruction cache");
   }
-
+#endif  // ANDROID
 #else  // USE_SIMULATOR.
   // Not generating mips instructions for C-code. This means that we are
   // building a mips emulator based target.  We should notify the simulator
=======================================
--- /branches/3.7/src/version.cc        Tue Jan 24 00:22:55 2012
+++ /branches/3.7/src/version.cc        Thu Jan 26 09:20:12 2012
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     7
 #define BUILD_NUMBER      12
-#define PATCH_LEVEL       19
+#define PATCH_LEVEL       20
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
 #define IS_CANDIDATE_VERSION 0

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to