Sha256: 646238399e2a00d19dcd2064e93238a9e8bef0d61129da5f839a5ee0cc56aeea

Contents?: true

Size: 1.24 KB

Versions: 10

Compression:

Stored size: 1.24 KB

Contents

// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// CPU specific code for ppc independent of OS goes here.

#if V8_TARGET_ARCH_PPC

#include "src/assembler.h"
#include "src/macro-assembler.h"

namespace v8 {
namespace internal {

void CpuFeatures::FlushICache(void* buffer, size_t size) {
#if !defined(USE_SIMULATOR)
  if (CpuFeatures::IsSupported(INSTR_AND_DATA_CACHE_COHERENCY)) {
    __asm__ __volatile__(
        "sync \n"
        "icbi 0, %0  \n"
        "isync  \n"
        : /* no output */
        : "r"(buffer)
        : "memory");
    return;
  }

  const int kCacheLineSize = CpuFeatures::icache_line_size();
  intptr_t mask = kCacheLineSize - 1;
  byte *start =
      reinterpret_cast<byte *>(reinterpret_cast<intptr_t>(buffer) & ~mask);
  byte *end = static_cast<byte *>(buffer) + size;
  for (byte *pointer = start; pointer < end; pointer += kCacheLineSize) {
    __asm__(
        "dcbf 0, %0  \n"
        "sync        \n"
        "icbi 0, %0  \n"
        "isync       \n"
        : /* no output */
        : "r"(pointer));
  }

#endif  // !USE_SIMULATOR
}
}  // namespace internal
}  // namespace v8

#endif  // V8_TARGET_ARCH_PPC

Version data entries

10 entries across 9 versions & 2 rubygems

Version Path
libv8-6.0.286.54.1 vendor/v8/src/ppc/cpu-ppc.cc
libv8-6.0.286.54.0 vendor/v8/src/ppc/cpu-ppc.cc
libv8-6.0.286.54.0beta2 vendor/v8/src/ppc/cpu-ppc.cc
libv8-6.0.286.54.0beta1 vendor/v8/src/ppc/cpu-ppc.cc
libv8-6.0.286.44.0beta1 vendor/v8/src/ppc/cpu-ppc.cc
node-compiler-0.9.1 vendor/node/deps/v8/src/ppc/cpu-ppc.cc
node-compiler-0.9.0 vendor/node-v7.2.1/deps/v8/src/ppc/cpu-ppc.cc
node-compiler-0.8.0 vendor/node-v7.2.0/deps/v8/src/ppc/cpu-ppc.cc
node-compiler-0.7.0 vendor/node-v7.1.0/deps/v8/src/ppc/cpu-ppc.cc
node-compiler-0.7.0 vendor/node-v6.9.1/deps/v8/src/ppc/cpu-ppc.cc