void-packages/srcpkgs/mozjs102/patches/armv6l-isb.patch

16 lines
657 B
Diff

diff -rup Architecture-arm.cpp.orig Architecture-arm.cpp
--- a/js/src/jit/arm/Architecture-arm.cpp
+++ b/js/src/jit/arm/Architecture-arm.cpp
@@ -531,7 +531,11 @@ void FlushExecutionContext() {
#ifndef JS_SIMULATOR_ARM
// Ensure that any instructions already in the pipeline are discarded and
// reloaded from the icache.
- asm volatile("isb\n" : : : "memory");
+# if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__)
+ asm volatile("isb\n" : : : "memory");
+# else
+ asm volatile("mcr p15, 0, %0, c7, c5, 4" : : "r" (0) : "memory");
+# endif
#else
// We assume the icache flushing routines on other platforms take care of this
#endif