diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn index 6106d910a453834337dfc1a267642f0efdd07e4d..260fead2a96e29bb05767cddc2eaf7bd7ca34da0 100644 --- a/runtime/BUILD.gn +++ b/runtime/BUILD.gn @@ -12,6 +12,7 @@ # limitations under the License. import("//ark/runtime_core/ark_config.gni") +import("//build/config/arm.gni") import("//build/ohos.gni") import("$ark_root/verification/verification.gni") @@ -159,11 +160,26 @@ ohos_static_library("libarkruntime_static") { if (current_cpu == "arm") { sources += [ "arch/arm/interpreter_support.S", - "bridge/arch/arm/compiled_code_to_interpreter_bridge_arm.S", "bridge/arch/arm/compiled_code_to_interpreter_bridge_dyn_arm.S", - "bridge/arch/arm/interpreter_to_compiled_code_bridge_arm.S", "bridge/arch/arm/interpreter_to_compiled_code_bridge_dyn_arm.S", ] + if (arm_float_abi == "softfp") { + sources += [ + "bridge/arch/arm/compiled_code_to_interpreter_bridge_arm.S", + "bridge/arch/arm/interpreter_to_compiled_code_bridge_arm.S", + ] + } else if (arm_float_abi == "hard") { + sources += [ + "bridge/arch/arm/compiled_code_to_interpreter_bridge_armhf.S", + "bridge/arch/arm/interpreter_to_compiled_code_bridge_armhf.S", + ] + } else { + print("Unsupported arm float abi type") + sources += [ + "bridge/arch/arm/compiled_code_to_interpreter_bridge_armsf.S", + "bridge/arch/arm/interpreter_to_compiled_code_bridge_arm.S", + ] + } } else if (current_cpu == "arm64") { sources += [ "arch/aarch64/interpreter_support.S", diff --git a/runtime/bridge/arch/arm/compiled_code_to_interpreter_bridge_armsf.S b/runtime/bridge/arch/arm/compiled_code_to_interpreter_bridge_armsf.S new file mode 100644 index 0000000000000000000000000000000000000000..e711e6c0cd5614b14dd8964ca256ea05577cf2a5 --- /dev/null +++ b/runtime/bridge/arch/arm/compiled_code_to_interpreter_bridge_armsf.S @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "arch/asm_support.h" +#include "arch/arm/shorty.S" +#include "shorty_values.h" + +#define SHORTY_PTR_REG DEFAULT_SHORTY_PTR_REG +#define SHORTY_REG DEFAULT_SHORTY_REG + +// Frame* CreateFrameForMethod(Method* method, Frame* prev); +.extern CreateFrameForMethod +// void InterpreterEntryPoint(Method *method, Frame* frame); +.extern InterpreterEntryPoint +// bool IncrementHotnessCounter(Method *method); +.extern IncrementHotnessCounter + +.global CompiledCodeToInterpreterBridge +.type CompiledCodeToInterpreterBridge, %function +CompiledCodeToInterpreterBridge: + // Not implemented yet