src/cpu/ppc/vm/icache_ppc.cpp

Print this page




  51   // invalidate respective cache lines in instruction cache
  52   for (address a = start; a < end; a += ICache::line_size) {
  53     __asm__ __volatile__(
  54      "icbi 0, %0   \n"
  55      :
  56      : "r" (a)
  57      : "memory");
  58   }
  59 
  60   // discard fetched instructions
  61   __asm__ __volatile__(
  62      "isync \n"
  63      :
  64      :
  65      : "memory");
  66 
  67   return magic;
  68 }
  69 
  70 void ICacheStubGenerator::generate_icache_flush(ICache::flush_icache_stub_t* flush_icache_stub) {
  71   StubCodeMark mark(this, "ICache", "flush_icache_stub");
  72 
  73   *flush_icache_stub = (ICache::flush_icache_stub_t)ICache::ppc64_flush_icache;
  74 
  75   // First call to flush itself
  76   ICache::invalidate_range((address)(*flush_icache_stub), 0);
  77 }


  51   // invalidate respective cache lines in instruction cache
  52   for (address a = start; a < end; a += ICache::line_size) {
  53     __asm__ __volatile__(
  54      "icbi 0, %0   \n"
  55      :
  56      : "r" (a)
  57      : "memory");
  58   }
  59 
  60   // discard fetched instructions
  61   __asm__ __volatile__(
  62      "isync \n"
  63      :
  64      :
  65      : "memory");
  66 
  67   return magic;
  68 }
  69 
  70 void ICacheStubGenerator::generate_icache_flush(ICache::flush_icache_stub_t* flush_icache_stub) {

  71 
  72   *flush_icache_stub = (ICache::flush_icache_stub_t)ICache::ppc64_flush_icache;
  73 
  74   // First call to flush itself
  75   ICache::invalidate_range((address)(*flush_icache_stub), 0);
  76 }