From 4184f23701a64e9902ffced803968fcc5601764b Mon Sep 17 00:00:00 2001 From: Ulya Trafimovich Date: Thu, 26 Jan 2023 12:25:22 +0000 Subject: riscv64: add initial support for ART. The only supported mode is the switch interpreter. JNI transitions are not implemented yet (not even generic JNI trampoline), therefore it is impossible to run even a simple hello world test (because it requires loading Java libraries and initializing classes in them, many of which call native methods). The only passing ART test is 000-nop. Test: run ART test 000-nop on a Linux RISC-V VM: lunch aosp_riscv64-userdebug export ART_TEST_SSH_USER=ubuntu export ART_TEST_SSH_HOST=localhost export ART_TEST_SSH_PORT=10001 export ART_TEST_ON_VM=true . art/tools/buildbot-utils.sh art/tools/buildbot-build.sh --target # Create, boot and configure the VM. art/tools/buildbot-vm.sh create art/tools/buildbot-vm.sh boot art/tools/buildbot-vm.sh setup-ssh # password: 'ubuntu' art/tools/buildbot-cleanup-device.sh art/tools/buildbot-setup-device.sh art/tools/buildbot-sync.sh art/test.py --target -r --no-prebuild --ndebug --no-image \ --64 --interpreter 000-nop Co-authored-by: Lifang Xia Change-Id: Iac267525527901b74e863cb8c72ddcf0789e8a5d --- compiler/optimizing/codegen_test_utils.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'compiler/optimizing/codegen_test_utils.h') diff --git a/compiler/optimizing/codegen_test_utils.h b/compiler/optimizing/codegen_test_utils.h index 88551d8e90..7af9d0f44c 100644 --- a/compiler/optimizing/codegen_test_utils.h +++ b/compiler/optimizing/codegen_test_utils.h @@ -36,6 +36,10 @@ #include "code_generator_arm64.h" #endif +#ifdef ART_ENABLE_CODEGEN_riscv64 +#include "code_generator_riscv64.h" +#endif + #ifdef ART_ENABLE_CODEGEN_x86 #include "code_generator_x86.h" #endif @@ -329,6 +333,10 @@ inline CodeGenerator* create_codegen_arm64(HGraph* graph, const CompilerOptions& } #endif +#ifdef ART_ENABLE_CODEGEN_riscv64 +inline CodeGenerator* create_codegen_riscv64(HGraph*, const CompilerOptions&) { return nullptr; } +#endif + #ifdef ART_ENABLE_CODEGEN_x86 inline CodeGenerator* create_codegen_x86(HGraph* graph, const CompilerOptions& compiler_options) { return new (graph->GetAllocator()) TestCodeGeneratorX86(graph, compiler_options); -- cgit v1.2.3-59-g8ed1b