Home | History | Annotate | Download | only in arch
      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(__mips__) && !defined(__LP64__)
     32 #include "mips/context_mips.h"
     33 #define RUNTIME_CONTEXT_TYPE mips::MipsContext
     34 #elif defined(__mips__) && defined(__LP64__)
     35 #include "mips64/context_mips64.h"
     36 #define RUNTIME_CONTEXT_TYPE mips64::Mips64Context
     37 #elif defined(__i386__)
     38 #include "x86/context_x86.h"
     39 #define RUNTIME_CONTEXT_TYPE x86::X86Context
     40 #elif defined(__x86_64__)
     41 #include "x86_64/context_x86_64.h"
     42 #define RUNTIME_CONTEXT_TYPE x86_64::X86_64Context
     43 #else
     44 #error unimplemented
     45 #endif
     46 
     47 namespace art {
     48 
     49 using RuntimeContextType = RUNTIME_CONTEXT_TYPE;
     50 
     51 }  // namespace art
     52 
     53 #undef RUNTIME_CONTEXT_TYPE
     54 
     55 #endif  // ART_RUNTIME_ARCH_CONTEXT_INL_H_
     56