js/src/jit/JitCommon.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     2  * vim: set ts=8 sts=4 et sw=4 tw=99:
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #ifndef jit_JitCommon_h
     8 #define jit_JitCommon_h
    10 // Various macros used by all JITs, including YARR.
    12 #ifdef JS_ARM_SIMULATOR
    13 #include "jit/arm/Simulator-arm.h"
    15 // Call into cross-jitted code by following the ABI of the simulated architecture.
    16 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7)     \
    17     (js::jit::Simulator::Current()->call(                              \
    18         JS_FUNC_TO_DATA_PTR(uint8_t *, entry), 8, p0, p1, p2, p3, p4, p5, p6, p7) & 0xffffffff)
    20 #define CALL_GENERATED_YARR_CODE3(entry, p0, p1, p2)     \
    21     js::jit::Simulator::Current()->call(JS_FUNC_TO_DATA_PTR(uint8_t *, entry), 3, p0, p1, p2)
    23 #define CALL_GENERATED_YARR_CODE4(entry, p0, p1, p2, p3) \
    24     js::jit::Simulator::Current()->call(JS_FUNC_TO_DATA_PTR(uint8_t *, entry), 4, p0, p1, p2, p3)
    26 #define CALL_GENERATED_ASMJS(entry, p0, p1)              \
    27     (Simulator::Current()->call(JS_FUNC_TO_DATA_PTR(uint8_t *, entry), 2, p0, p1) & 0xffffffff)
    29 #else
    31 // Call into jitted code by following the ABI of the native architecture.
    32 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7)   \
    33   entry(p0, p1, p2, p3, p4, p5, p6, p7)
    35 #define CALL_GENERATED_YARR_CODE3(entry, p0, p1, p2)                 \
    36   entry(p0, p1, p2)
    38 #define CALL_GENERATED_YARR_CODE4(entry, p0, p1, p2, p3)             \
    39   entry(p0, p1, p2, p3)
    41 #define CALL_GENERATED_ASMJS(entry, p0, p1)                          \
    42   entry(p0, p1)
    44 #endif
    46 #endif // jit_JitCommon_h

mercurial