diff options
author | 2023-11-22 23:15:12 +0000 | |
---|---|---|
committer | 2023-11-23 08:42:10 +0000 | |
commit | 08d20ebe908d8230108fa64d871d69831c7587e6 (patch) | |
tree | 46c94f0d396db6fd2ed074fa120ea3eb5e8fd4f3 /runtime/class_linker.cc | |
parent | ae0e5c2d87931ed1ba072fc437c6b1b5bf9e0be2 (diff) |
Revert "riscv64: re-enable an invoke fast path"
This reverts commit 301feae50e211656ec3ae1d0ac9445ca8bba623d.
Reason for revert: b/312482932 - breaks RISC-V boot.
Change-Id: Id5a506949abcb2bc85a10cf5efe9b65ac4ee8031
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r-- | runtime/class_linker.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 6f819cf2e5..186f944272 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -4006,12 +4006,13 @@ void ClassLinker::LoadMethod(const DexFile& dex_file, } } } - 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 (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 (UNLIKELY((access_flags & kAccNative) != 0u)) { |