blob: e33148ce4e13518397a038e14f65e819bbf04360 [file] [log] [blame]
Steve Blocka7e24c12009-10-30 11:49:00 +00001// Copyright 2006-2008 the V8 project authors. All rights reserved.
2// Redistribution and use in source and binary forms, with or without
3// modification, are permitted provided that the following conditions are
4// met:
5//
6// * Redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer.
8// * Redistributions in binary form must reproduce the above
9// copyright notice, this list of conditions and the following
10// disclaimer in the documentation and/or other materials provided
11// with the distribution.
12// * Neither the name of Google Inc. nor the names of its
13// contributors may be used to endorse or promote products derived
14// from this software without specific prior written permission.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28#ifndef V8_MACRO_ASSEMBLER_H_
29#define V8_MACRO_ASSEMBLER_H_
30
31
32// Helper types to make boolean flag easier to read at call-site.
33enum InvokeFlag {
34 CALL_FUNCTION,
35 JUMP_FUNCTION
36};
37
38
39enum CodeLocation {
40 IN_JAVASCRIPT,
41 IN_JS_ENTRY,
42 IN_C_ENTRY
43};
44
45
46enum HandlerType {
47 TRY_CATCH_HANDLER,
48 TRY_FINALLY_HANDLER,
49 JS_ENTRY_HANDLER
50};
51
52
53// Flags used for the AllocateInNewSpace functions.
54enum AllocationFlags {
55 // No special flags.
56 NO_ALLOCATION_FLAGS = 0,
57 // Return the pointer to the allocated already tagged as a heap object.
58 TAG_OBJECT = 1 << 0,
59 // The content of the result register already contains the allocation top in
60 // new space.
61 RESULT_CONTAINS_TOP = 1 << 1
62};
63
64
65#if V8_TARGET_ARCH_IA32
66#include "assembler.h"
67#include "ia32/assembler-ia32.h"
68#include "ia32/assembler-ia32-inl.h"
69#include "code.h" // must be after assembler_*.h
70#include "ia32/macro-assembler-ia32.h"
71#elif V8_TARGET_ARCH_X64
72#include "assembler.h"
73#include "x64/assembler-x64.h"
74#include "x64/assembler-x64-inl.h"
75#include "code.h" // must be after assembler_*.h
76#include "x64/macro-assembler-x64.h"
77#elif V8_TARGET_ARCH_ARM
78#include "arm/constants-arm.h"
79#include "assembler.h"
Leon Clarkee46be812010-01-19 14:06:41 +000080#ifdef V8_ARM_VARIANT_THUMB
81#include "arm/assembler-thumb2.h"
82#include "arm/assembler-thumb2-inl.h"
83#else
Steve Blocka7e24c12009-10-30 11:49:00 +000084#include "arm/assembler-arm.h"
85#include "arm/assembler-arm-inl.h"
Leon Clarkee46be812010-01-19 14:06:41 +000086#endif
Steve Blocka7e24c12009-10-30 11:49:00 +000087#include "code.h" // must be after assembler_*.h
88#include "arm/macro-assembler-arm.h"
Andrei Popescu31002712010-02-23 13:46:05 +000089#elif V8_TARGET_ARCH_MIPS
90#include "mips/constants-mips.h"
91#include "assembler.h"
92#include "mips/assembler-mips.h"
93#include "mips/assembler-mips-inl.h"
94#include "code.h" // must be after assembler_*.h
95#include "mips/macro-assembler-mips.h"
Steve Blocka7e24c12009-10-30 11:49:00 +000096#else
97#error Unsupported target architecture.
98#endif
99
100#endif // V8_MACRO_ASSEMBLER_H_