summaryrefslogtreecommitdiff
path: root/compiler/optimizing/codegen_test_utils.h
diff options
context:
space:
mode:
author Ulya Trafimovich <skvadrik@google.com> 2023-01-26 12:25:22 +0000
committer Ulya Trofimovich <skvadrik@google.com> 2023-02-21 14:04:16 +0000
commit4184f23701a64e9902ffced803968fcc5601764b (patch)
tree46ada9c7c2d3f504979e35f9101842004c7e5e72 /compiler/optimizing/codegen_test_utils.h
parent5e8ca6af1ef27c4d3e504052c3edec079433e7eb (diff)
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 <lifang_xia@linux.alibaba.com> Change-Id: Iac267525527901b74e863cb8c72ddcf0789e8a5d
Diffstat (limited to 'compiler/optimizing/codegen_test_utils.h')
-rw-r--r--compiler/optimizing/codegen_test_utils.h8
1 files changed, 8 insertions, 0 deletions
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);