Changeset 165961 in webkit


Ignore:
Timestamp:
Mar 20, 2014 7:03:43 AM (10 years ago)
Author:
rgabor@webkit.org
Message:

[ARM64] Fix assembler build issues and add cacheFlush support for Linux
https://bugs.webkit.org/show_bug.cgi?id=130502

Reviewed by Michael Saboff.

Add limits.h for INT_MIN in ARM64Assembler(). Delete shouldBlindForSpecificArch(uintptr_t)
because on ARM64 uint64_t and uintptr_t is the same with GCC and Clang as well.
Add cacheFlush support for Linux.

  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::linuxPageFlush):
(JSC::ARM64Assembler::cacheFlush):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::shouldBlindForSpecificArch):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r165946 r165961  
     12014-03-20  Gabor Rapcsanyi  <rgabor@webkit.org>
     2
     3        [ARM64] Fix assembler build issues and add cacheFlush support for Linux
     4        https://bugs.webkit.org/show_bug.cgi?id=130502
     5
     6        Reviewed by Michael Saboff.
     7
     8        Add limits.h for INT_MIN in ARM64Assembler(). Delete shouldBlindForSpecificArch(uintptr_t)
     9        because on ARM64 uint64_t and uintptr_t is the same with GCC and Clang as well.
     10        Add cacheFlush support for Linux.
     11
     12        * assembler/ARM64Assembler.h:
     13        (JSC::ARM64Assembler::linuxPageFlush):
     14        (JSC::ARM64Assembler::cacheFlush):
     15        * assembler/MacroAssemblerARM64.h:
     16        (JSC::MacroAssemblerARM64::shouldBlindForSpecificArch):
     17
    1182014-03-19  Gavin Barraclough  <barraclough@apple.com>
    219
  • trunk/Source/JavaScriptCore/assembler/ARM64Assembler.h

    r165293 r165961  
    3030
    3131#include "AssemblerBuffer.h"
     32#include <limits.h>
    3233#include <wtf/Assertions.h>
    3334#include <wtf/Vector.h>
     
    28422843    unsigned debugOffset() { return m_buffer.debugOffset(); }
    28432844
     2845#if OS(LINUX) && COMPILER(GCC)
     2846    static inline void linuxPageFlush(uintptr_t begin, uintptr_t end)
     2847    {
     2848        __builtin___clear_cache(reinterpret_cast<void*>(begin), reinterpret_cast<void*>(end));
     2849    }
     2850#endif
     2851
    28442852    static void cacheFlush(void* code, size_t size)
    28452853    {
    28462854#if OS(IOS)
    28472855        sys_cache_control(kCacheFunctionPrepareForExecution, code, size);
     2856#elif OS(LINUX)
     2857        size_t page = pageSize();
     2858        uintptr_t current = reinterpret_cast<uintptr_t>(code);
     2859        uintptr_t end = current + size;
     2860        uintptr_t firstPageEnd = (current & ~(page - 1)) + page;
     2861
     2862        if (end <= firstPageEnd) {
     2863            linuxPageFlush(current, end);
     2864            return;
     2865        }
     2866
     2867        linuxPageFlush(current, firstPageEnd);
     2868
     2869        for (current = firstPageEnd; current + page < end; current += page)
     2870            linuxPageFlush(current, current + page);
     2871
     2872        linuxPageFlush(current, end);
    28482873#else
    28492874#error "The cacheFlush support is missing on this platform."
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.h

    r164764 r165961  
    130130    static bool shouldBlindForSpecificArch(uint32_t value) { return value >= 0x00ffffff; }
    131131    static bool shouldBlindForSpecificArch(uint64_t value) { return value >= 0x00ffffff; }
    132     static bool shouldBlindForSpecificArch(uintptr_t value) { return value >= 0x00ffffff; }
    133132
    134133    // Integer operations:
Note: See TracChangeset for help on using the changeset viewer.