]>
git.saurik.com Git - apple/javascriptcore.git/blob - llint/LLIntOfflineAsmConfig.h
2 * Copyright (C) 2012 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
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.
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.
26 #ifndef LLIntOfflineAsmConfig_h
27 #define LLIntOfflineAsmConfig_h
29 #include "LLIntCommon.h"
30 #include <wtf/Assertions.h>
31 #include <wtf/InlineASM.h>
32 #include <wtf/Platform.h>
35 #if ENABLE(LLINT_C_LOOP)
36 #define OFFLINE_ASM_C_LOOP 1
37 #define OFFLINE_ASM_X86 0
38 #define OFFLINE_ASM_ARM 0
39 #define OFFLINE_ASM_ARMv7 0
40 #define OFFLINE_ASM_ARMv7_TRADITIONAL 0
41 #define OFFLINE_ASM_X86_64 0
42 #define OFFLINE_ASM_ARMv7s 0
43 #define OFFLINE_ASM_MIPS 0
44 #define OFFLINE_ASM_SH4 0
46 #else // !ENABLE(LLINT_C_LOOP)
48 #define OFFLINE_ASM_C_LOOP 0
51 #define OFFLINE_ASM_X86 1
53 #define OFFLINE_ASM_X86 0
56 #ifdef __ARM_ARCH_7S__
57 #define OFFLINE_ASM_ARMv7s 1
59 #define OFFLINE_ASM_ARMv7s 0
63 #define OFFLINE_ASM_ARMv7 1
65 #define OFFLINE_ASM_ARMv7 0
68 #if CPU(ARM_TRADITIONAL)
69 #if WTF_ARM_ARCH_AT_LEAST(7)
70 #define OFFLINE_ASM_ARMv7_TRADITIONAL 1
71 #define OFFLINE_ASM_ARM 0
73 #define OFFLINE_ASM_ARM 1
74 #define OFFLINE_ASM_ARMv7_TRADITIONAL 0
77 #define OFFLINE_ASM_ARMv7_TRADITIONAL 0
78 #define OFFLINE_ASM_ARM 0
82 #define OFFLINE_ASM_X86_64 1
84 #define OFFLINE_ASM_X86_64 0
88 #define OFFLINE_ASM_MIPS 1
90 #define OFFLINE_ASM_MIPS 0
94 #define OFFLINE_ASM_SH4 1
96 #define OFFLINE_ASM_SH4 0
99 #endif // !ENABLE(LLINT_C_LOOP)
102 #define OFFLINE_ASM_ARM64 1
104 #define OFFLINE_ASM_ARM64 0
108 #define OFFLINE_ASM_JSVALUE64 1
110 #define OFFLINE_ASM_JSVALUE64 0
114 #define OFFLINE_ASM_ASSERT_ENABLED 1
116 #define OFFLINE_ASM_ASSERT_ENABLED 0
120 #define OFFLINE_ASM_BIG_ENDIAN 1
122 #define OFFLINE_ASM_BIG_ENDIAN 0
126 #define OFFLINE_ASM_JIT_ENABLED 1
128 #define OFFLINE_ASM_JIT_ENABLED 0
131 #if LLINT_EXECUTION_TRACING
132 #define OFFLINE_ASM_EXECUTION_TRACING 1
134 #define OFFLINE_ASM_EXECUTION_TRACING 0
137 #if LLINT_ALWAYS_ALLOCATE_SLOW
138 #define OFFLINE_ASM_ALWAYS_ALLOCATE_SLOW 1
140 #define OFFLINE_ASM_ALWAYS_ALLOCATE_SLOW 0
143 #if ENABLE(VALUE_PROFILER)
144 #define OFFLINE_ASM_VALUE_PROFILER 1
146 #define OFFLINE_ASM_VALUE_PROFILER 0
153 #define OFFLINE_ASM_CPLOAD(reg) \
155 ".cpload " SX(reg) "\n" \
158 #define OFFLINE_ASM_CPLOAD(reg)
162 #ifdef __ARM_ARCH_7S__
163 #define OFFLINE_ASM_ARMv7s 1
165 #define OFFLINE_ASM_ARMv7s 0
168 // These are for building an interpreter from generated assembly code:
169 #define OFFLINE_ASM_BEGIN asm (
170 #define OFFLINE_ASM_END );
173 #define OFFLINE_ASM_GLOBAL_LABEL(label) \
174 ".globl " SYMBOL_STRING(label) "\n" \
175 HIDE_SYMBOL(label) "\n" \
177 ".thumb_func " THUMB_FUNC_PARAM(label) "\n" \
178 SYMBOL_STRING(label) ":\n"
180 #define OFFLINE_ASM_GLOBAL_LABEL(label) \
181 ".globl " SYMBOL_STRING(label) "\n" \
182 HIDE_SYMBOL(label) "\n" \
183 SYMBOL_STRING(label) ":\n"
186 #define OFFLINE_ASM_LOCAL_LABEL(label) LOCAL_LABEL_STRING(label) ":\n"
188 #endif // LLIntOfflineAsmConfig_h