1 /* 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 31 #elif defined(__riscv) 32 #include "riscv64/context_riscv64.h" 33 #define RUNTIME_CONTEXT_TYPE riscv64::Riscv64Context 34 #elif defined(__i386__) 35 #include "x86/context_x86.h" 36 #define RUNTIME_CONTEXT_TYPE x86::X86Context 37 #elif defined(__x86_64__) 38 #include "x86_64/context_x86_64.h" 39 #define RUNTIME_CONTEXT_TYPE x86_64::X86_64Context 40 #else 41 #error unimplemented 42 #endif 43 44 namespace art HIDDEN { 45 46 using RuntimeContextType = RUNTIME_CONTEXT_TYPE; 47 48 } // namespace art 49 50 #undef RUNTIME_CONTEXT_TYPE 51 52 #endif // ART_RUNTIME_ARCH_CONTEXT_INL_H_ 53