Changeset 79773 in webkit for trunk/Source/JavaScriptCore/jit


Ignore:
Timestamp:
Feb 26, 2011, 2:11:10 AM (14 years ago)
Author:
[email protected]
Message:

2011-02-26 Thouraya ANDOLSI <[email protected]>

Reviewed by Nikolas Zimmermann.

SH4 JIT SUPPORT
https://bugs.webkit.org/show_bug.cgi?id=44329

Provide an ExecutableAllocater::cacheFlush() implementation for
Linux/SH4.

  • jit/ExecutableAllocator.h: (JSC::ExecutableAllocator::cacheFlush):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/ExecutableAllocator.h

    r77972 r79773  
    4848#endif
    4949
     50#if CPU(SH4) && OS(LINUX)
     51#include <asm/cachectl.h>
     52#include <asm/unistd.h>
     53#include <sys/syscall.h>
     54#include <unistd.h>
     55#endif
     56
    5057#if OS(WINCE)
    5158// From pkfuncs.h (private header file from the Platform Builder)
     
    311318        IMemCache1_ClearCache(memCache.get(), reinterpret_cast<uint32>(code), size, MEMSPACE_CACHE_INVALIDATE, MEMSPACE_INSTCACHE);
    312319    }
     320#elif CPU(SH4) && OS(LINUX)
     321    static void cacheFlush(void* code, size_t size)
     322    {
     323#ifdef CACHEFLUSH_D_L2
     324        syscall(__NR_cacheflush, reinterpret_cast<unsigned>(code), size, CACHEFLUSH_D_WB | CACHEFLUSH_I | CACHEFLUSH_D_L2);
     325#else
     326        syscall(__NR_cacheflush, reinterpret_cast<unsigned>(code), size, CACHEFLUSH_D_WB | CACHEFLUSH_I);
     327#endif
     328    }
    313329#else
    314330    #error "The cacheFlush support is missing on this platform."
Note: See TracChangeset for help on using the changeset viewer.