blob: cac7c4357d521557cf5b1e9b004e2937447970c9 [file] [log] [blame]
Mathieu Chartiera62b4532017-04-26 13:16:25 -07001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// This file is special-purpose for cases where you want a stack context. Most users should use
18// Context::Create().
19
20#include "context.h"
21
22#ifndef ART_RUNTIME_ARCH_CONTEXT_INL_H_
23#define ART_RUNTIME_ARCH_CONTEXT_INL_H_
24
25#if defined(__arm__)
26#include "arm/context_arm.h"
27#define RUNTIME_CONTEXT_TYPE arm::ArmContext
28#elif defined(__aarch64__)
29#include "arm64/context_arm64.h"
30#define RUNTIME_CONTEXT_TYPE arm64::Arm64Context
Mathieu Chartiera62b4532017-04-26 13:16:25 -070031#elif defined(__i386__)
32#include "x86/context_x86.h"
33#define RUNTIME_CONTEXT_TYPE x86::X86Context
34#elif defined(__x86_64__)
35#include "x86_64/context_x86_64.h"
36#define RUNTIME_CONTEXT_TYPE x86_64::X86_64Context
37#else
38#error unimplemented
39#endif
40
41namespace art {
42
43using RuntimeContextType = RUNTIME_CONTEXT_TYPE;
44
45} // namespace art
46
47#undef RUNTIME_CONTEXT_TYPE
48
49#endif // ART_RUNTIME_ARCH_CONTEXT_INL_H_