From 0dd6fdbf6a821898617f1bd8e57123be048c07f5 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
Date: Mon, 16 Dec 2024 05:49:57 +0000
Subject: [PATCH] The ISB instruction isn't available in ARMv5 or v6, so guard
 it's use to fix the build on qemuarmv5.

Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 js/src/jit/arm/Architecture-arm.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/js/src/jit/arm/Architecture-arm.cpp b/js/src/jit/arm/Architecture-arm.cpp
index d4c5026705..fc0455eaff 100644
--- a/js/src/jit/arm/Architecture-arm.cpp
+++ b/js/src/jit/arm/Architecture-arm.cpp
@@ -528,9 +528,11 @@ void FlushICache(void* code, size_t size) {
 
 void FlushExecutionContext() {
 #ifndef JS_SIMULATOR_ARM
+#if __ARM_ARCH >= 7
   // Ensure that any instructions already in the pipeline are discarded and
   // reloaded from the icache.
   asm volatile("isb\n" : : : "memory");
+#endif
 #else
   // We assume the icache flushing routines on other platforms take care of this
 #endif
