summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2023-11-10 10:23:57 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2023-11-10 13:29:04 +0000
commit9117729c2ba8b6053af8dd7dc70fe416302bc33f (patch)
tree84cdccd08dcf2d66f772a8c3c6f42acd54a6d707 /runtime/class_linker.cc
parent87fb6c91839b094d5937e79023d9204d37f46d2d (diff)
riscv64: Disable nterp invoke fast path.
This fast-path is currently broken because it passes references with sign-extension. Test: m Bug: 283082047 Change-Id: Ib554e5dfea5376538a6fa87426c57e8612734b17
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index d8383222cf..d08fe23439 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -4006,7 +4006,12 @@ void ClassLinker::LoadMethod(const DexFile& dex_file,
}
}
if (all_parameters_are_reference_or_int && shorty[0] != 'F' && shorty[0] != 'D') {
- access_flags |= kAccNterpInvokeFastPathFlag;
+ // FIXME(riscv64): This optimization is currently disabled because riscv64 needs
+ // to distinguish between zero-extended references and sign-extended integers.
+ // We should enable this for references only and fix corresponding nterp fast-paths.
+ if (kRuntimeISA != InstructionSet::kRiscv64) {
+ access_flags |= kAccNterpInvokeFastPathFlag;
+ }
}
if (UNLIKELY((access_flags & kAccNative) != 0u)) {