summaryrefslogtreecommitdiff
path: root/runtime/interpreter/mterp/nterp_impl.cc
diff options
context:
space:
mode:
author Ulya Trafimovich <skvadrik@google.com> 2023-04-19 14:37:30 +0100
committer Ulya Trafimovich <skvadrik@google.com> 2023-04-19 14:42:16 +0100
commit2ff7fcccdeb2100cb5a3cc5314411fd23dd5f7c9 (patch)
treefd4cc11567546f8cc6b32526704763a8fe948355 /runtime/interpreter/mterp/nterp_impl.cc
parenta9054c763b0d05d187ed1457ec5a947b7fd4c041 (diff)
riscv64: Disable Nterp so that zygote doesn't SIGILL at boot.
This started to happen after https://r.android.com/2537050, which introduced initial support for Nterp in ART, but left all stubs unimplemented (crashing with SIGILL on execution). Bug: 271573990 Test: make sure zygote does not SIGILL at boot: $ lunch aosp_cf_riscv64_phone-userdebug && m $ launch_cvd --gpu_mode=drm_virgl # grep logcat for SIGILL (in zygote64 process), observe none Change-Id: I1ac53b57d66414d56b10cd3abb5ae8c25b42c05d
Diffstat (limited to 'runtime/interpreter/mterp/nterp_impl.cc')
-rw-r--r--runtime/interpreter/mterp/nterp_impl.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/interpreter/mterp/nterp_impl.cc b/runtime/interpreter/mterp/nterp_impl.cc
index 98b8d6d028..f2a9855de1 100644
--- a/runtime/interpreter/mterp/nterp_impl.cc
+++ b/runtime/interpreter/mterp/nterp_impl.cc
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include "arch/instruction_set.h"
#include "interpreter/interpreter_common.h"
#include "nterp.h"
@@ -25,7 +26,10 @@ namespace art {
namespace interpreter {
-bool IsNterpSupported() { return !kPoisonHeapReferences && kReserveMarkingRegister; }
+bool IsNterpSupported() {
+ return !kPoisonHeapReferences && kReserveMarkingRegister &&
+ kRuntimeISA != InstructionSet::kRiscv64;
+}
bool CanRuntimeUseNterp() REQUIRES_SHARED(Locks::mutator_lock_) {
Runtime* runtime = Runtime::Current();