File: js-Enable-JIT-by-default-on-ARMv7-or-up-but-not-ARMv6-or-.patch

package info (click to toggle)
mozjs128 128.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,132,528 kB
  • sloc: javascript: 2,181,430; cpp: 1,371,420; python: 776,651; ansic: 641,398; xml: 117,736; sh: 17,537; asm: 13,468; makefile: 11,191; yacc: 4,504; perl: 2,221; lex: 1,414; ruby: 1,032; exp: 756; java: 185; sql: 66; sed: 18
file content (48 lines) | stat: -rw-r--r-- 1,249 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From: Simon McVittie <smcv@debian.org>
Date: Wed, 24 Aug 2022 20:52:33 +0100
Subject: js: Enable JIT by default on ARMv7 or up, but not ARMv6 or older

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1786619
Bug-Debian: https://bugs.debian.org/1017961
Signed-off-by: Simon McVittie <smcv@debian.org>
---
 js/moz.configure | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/js/moz.configure b/js/moz.configure
index 593b93a..20d28a6 100644
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -241,12 +241,14 @@ set_config(
 # =======================================================
 @depends(
     target,
+    arm_target,
     "--enable-record-tuple",
     "--enable-portable-baseline-interp",
     "--enable-explicit-resource-management",
 )
 def jit_default(
     target,
+    arm_target,
     enable_record_tuple,
     enable_portable_baseline_interp,
     enable_explicit_resource_management,
@@ -260,13 +262,16 @@ def jit_default(
     if target.cpu in (
         "x86",
         "x86_64",
-        "arm",
         "aarch64",
         "mips32",
         "mips64",
         "loongarch64",
     ):
         return True
+
+    if target.cpu == "arm" and arm_target.arm_arch >= 7:
+        return True
+
     return False