ARM: Don't try to flush the icache when there is nothing to flush
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 17 Feb 2011 07:47:05 +0000 (07:47 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 17 Feb 2011 07:47:05 +0000 (07:47 +0000)
The simulator implementation of the icache did not like size being zero.

BUG=v8:1090
Review URL: http://codereview.chromium.org/6526052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/arm/cpu-arm.cc

index 507954d..51c84b3 100644 (file)
@@ -50,6 +50,11 @@ void CPU::Setup() {
 
 
 void CPU::FlushICache(void* start, size_t size) {
+  // Nothing to do flushing no instructions.
+  if (size == 0) {
+    return;
+  }
+
 #if defined (USE_SIMULATOR)
   // Not generating ARM instructions for C-code. This means that we are
   // building an ARM emulator based target.  We should notify the simulator