1 /*
2  * Copyright (C) 2015 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 #include "../interpreter_common.h"
17 
18 /*
19  * Stub definitions for targets without mterp implementations.
20  */
21 
22 namespace art {
23 namespace interpreter {
24 /*
25  * Call this during initialization to verify that the values in asm-constants.h
26  * are still correct.
27  */
CheckMterpAsmConstants()28 void CheckMterpAsmConstants() {
29   // Nothing to check when mterp is not implemented.
30 }
31 
InitMterpTls(Thread * self)32 void InitMterpTls(Thread* self) {
33   self->SetMterpDefaultIBase(nullptr);
34   self->SetMterpCurrentIBase(nullptr);
35   self->SetMterpAltIBase(nullptr);
36 }
37 
38 /*
39  * The platform-specific implementation must provide this.
40  */
ExecuteMterpImpl(Thread * self,const uint16_t * dex_instructions,ShadowFrame * shadow_frame,JValue * result_register)41 extern "C" bool ExecuteMterpImpl(Thread* self,
42                                  const uint16_t* dex_instructions,
43                                  ShadowFrame* shadow_frame,
44                                  JValue* result_register)
45     REQUIRES_SHARED(Locks::mutator_lock_) {
46   UNUSED(self); UNUSED(shadow_frame); UNUSED(code_item); UNUSED(result_register);
47   UNIMPLEMENTED(art::FATAL);
48   return false;
49 }
50 
51 }  // namespace interpreter
52 }  // namespace art
53