summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index d08fe23439..3b0dda299e 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -4005,13 +4005,12 @@ void ClassLinker::LoadMethod(const DexFile& dex_file,
}
}
}
- if (all_parameters_are_reference_or_int && shorty[0] != 'F' && shorty[0] != 'D') {
- // 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 (kRuntimeISA != InstructionSet::kRiscv64 && all_parameters_are_reference_or_int &&
+ shorty[0] != 'F' && shorty[0] != 'D') {
+ access_flags |= kAccNterpInvokeFastPathFlag;
+ } else if (kRuntimeISA == InstructionSet::kRiscv64 && all_parameters_are_reference &&
+ shorty[0] != 'F' && shorty[0] != 'D') {
+ access_flags |= kAccNterpInvokeFastPathFlag;
}
if (UNLIKELY((access_flags & kAccNative) != 0u)) {