]> git.saurik.com Git - apple/javascriptcore.git/blame_incremental - llint/LLIntOfflineAsmConfig.h
JavaScriptCore-1097.13.tar.gz
[apple/javascriptcore.git] / llint / LLIntOfflineAsmConfig.h
... / ...
CommitLineData
1/*
2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#ifndef LLIntOfflineAsmConfig_h
27#define LLIntOfflineAsmConfig_h
28
29#include "LLIntCommon.h"
30#include <wtf/Assertions.h>
31#include <wtf/InlineASM.h>
32#include <wtf/Platform.h>
33
34#if CPU(X86)
35#define OFFLINE_ASM_X86 1
36#else
37#define OFFLINE_ASM_X86 0
38#endif
39
40#if CPU(ARM_THUMB2)
41#define OFFLINE_ASM_ARMv7 1
42#else
43#define OFFLINE_ASM_ARMv7 0
44#endif
45
46#if CPU(X86_64)
47#define OFFLINE_ASM_X86_64 1
48#else
49#define OFFLINE_ASM_X86_64 0
50#endif
51
52#if USE(JSVALUE64)
53#define OFFLINE_ASM_JSVALUE64 1
54#else
55#define OFFLINE_ASM_JSVALUE64 0
56#endif
57
58#if !ASSERT_DISABLED
59#define OFFLINE_ASM_ASSERT_ENABLED 1
60#else
61#define OFFLINE_ASM_ASSERT_ENABLED 0
62#endif
63
64#if CPU(BIG_ENDIAN)
65#define OFFLINE_ASM_BIG_ENDIAN 1
66#else
67#define OFFLINE_ASM_BIG_ENDIAN 0
68#endif
69
70#if LLINT_OSR_TO_JIT
71#define OFFLINE_ASM_JIT_ENABLED 1
72#else
73#define OFFLINE_ASM_JIT_ENABLED 0
74#endif
75
76#if LLINT_EXECUTION_TRACING
77#define OFFLINE_ASM_EXECUTION_TRACING 1
78#else
79#define OFFLINE_ASM_EXECUTION_TRACING 0
80#endif
81
82#if LLINT_ALWAYS_ALLOCATE_SLOW
83#define OFFLINE_ASM_ALWAYS_ALLOCATE_SLOW 1
84#else
85#define OFFLINE_ASM_ALWAYS_ALLOCATE_SLOW 0
86#endif
87
88#if ENABLE(VALUE_PROFILER)
89#define OFFLINE_ASM_VALUE_PROFILER 1
90#else
91#define OFFLINE_ASM_VALUE_PROFILER 0
92#endif
93
94#ifdef __ARM_ARCH_7S__
95#define OFFLINE_ASM_ARMv7s 1
96#else
97#define OFFLINE_ASM_ARMv7s 0
98#endif
99
100#if CPU(ARM_THUMB2)
101#define OFFLINE_ASM_GLOBAL_LABEL(label) \
102 ".globl " SYMBOL_STRING(label) "\n" \
103 HIDE_SYMBOL(name) "\n" \
104 ".thumb\n" \
105 ".thumb_func " THUMB_FUNC_PARAM(label) "\n" \
106 SYMBOL_STRING(label) ":\n"
107#else
108#define OFFLINE_ASM_GLOBAL_LABEL(label) \
109 ".globl " SYMBOL_STRING(label) "\n" \
110 HIDE_SYMBOL(name) "\n" \
111 SYMBOL_STRING(label) ":\n"
112#endif
113
114#endif // LLIntOfflineAsmConfig_h