summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Fix-32bit-arm.patch128
-rw-r--r--meta-oe/recipes-support/webkitgtk/webkitgtk3_2.48.7.bb1
2 files changed, 129 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Fix-32bit-arm.patch b/meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Fix-32bit-arm.patch
new file mode 100644
index 0000000000..fadef2a01b
--- /dev/null
+++ b/meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Fix-32bit-arm.patch
@@ -0,0 +1,128 @@
1From 014b9dad4ec5c432410254c0d0cab7d20b1f31d7 Mon Sep 17 00:00:00 2001
2From: Jason Schonberg <schonm@gmail.com>
3Date: Mon, 29 Sep 2025 14:34:48 -0400
4Subject: [PATCH] From: amaxcz <amaxcz@gmail.com> Date: Fri, 19 Sep 2025
5 11:55:30 +0000 Subject: [PATCH] JSC: fix op_instanceof handler for 32-bit
6 C-loop build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8MIME-Version: 1.0
9Content-Type: text/plain; charset=UTF-8
10Content-Transfer-Encoding: 8bit
11
12JSC: fix op_instanceof handler for 32-bit C-loop build
13
14Fixes missing 'op_instanceof' handler in LowLevelInterpreter32_64.asm
15which breaks 32‑bit builds.
16
17* No ChangeLog (raw external patch).
18
19Upstream-Status: Backport [https://bugs.webkit.org/show_bug.cgi?id=299166]
20
21Signed-off-by: Jason Schonberg <schonm@gmail.com>
22---
23 .../llint/LowLevelInterpreter32_64.asm | 95 ++++++++++++++++++-
24 1 file changed, 94 insertions(+), 1 deletion(-)
25
26diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
27index 0d7c92bb..0b81cc1a 100644
28--- a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
29+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
30@@ -3437,4 +3437,97 @@ slowPathOp(enumerator_has_own_property)
31 slowPathOp(mod)
32
33 llintSlowPathOp(has_structure_with_flags)
34-llintSlowPathOp(instanceof)
35+
36+llintOpWithMetadata(op_instanceof, OpInstanceof, macro (size, get, dispatch, metadata, return)
37+
38+ macro getAndLoadConstantOrVariable(fieldName, tagReg, payloadReg)
39+ get(fieldName, t5)
40+ loadConstantOrVariable(size, t5, tagReg, payloadReg)
41+ end
42+
43+ macro isObject(field, falseLabel)
44+ getAndLoadConstantOrVariable(field, t0, t1)
45+ bineq t0, CellTag, falseLabel
46+ bbneq JSCell::m_type[t1], ObjectType, falseLabel
47+ end
48+
49+ macro overridesHasInstance(hasInstanceField, constructorField, trueLabel)
50+ getAndLoadConstantOrVariable(hasInstanceField, t0, t1)
51+ bineq t0, CellTag, trueLabel
52+ loadp CodeBlock[cfr], t2
53+ loadp CodeBlock::m_globalObject[t2], t2
54+ loadp JSGlobalObject::m_functionProtoHasInstanceSymbolFunction[t2], t2
55+ bpneq t1, t2, trueLabel
56+
57+ get(constructorField, t5)
58+ loadConstantOrVariablePayload(size, t5, CellTag, t1, trueLabel)
59+ btbz JSCell::m_flags[t1], ImplementsDefaultHasInstance, trueLabel
60+ end
61+
62+ macro storeValue(tagReg, payloadReg, fieldName)
63+ move tagReg, t0
64+ move payloadReg, t1
65+ get(fieldName, t5)
66+ storei t0, TagOffset[cfr, t5, 8]
67+ storei t1, PayloadOffset[cfr, t5, 8]
68+ end
69+
70+.getHasInstance:
71+ isObject(m_constructor, .throwStaticError)
72+ get(m_constructor, t5)
73+ metadata(t2, t6)
74+ loadConstantOrVariablePayload(size, t5, CellTag, t3, .getHasInstanceSlow)
75+ performGetByIDHelper(OpInstanceof, m_hasInstanceModeMetadata, m_hasInstanceValueProfile, .getHasInstanceSlow, size,
76+ macro (resultTag, resultPayload)
77+ storeValue(resultTag, resultPayload, m_hasInstanceOrPrototype)
78+ jmp .getPrototype
79+ end)
80+ jmp .getPrototype
81+
82+.getHasInstanceSlow:
83+ callSlowPath(_llint_slow_path_get_hasInstance_from_instanceof)
84+ branchIfException(_llint_throw_from_slow_path_trampoline)
85+ jmp .getPrototype
86+
87+.getHasInstanceInlinedGetterOSRReturnPoint:
88+ # This path is taken when exiting to the LLInt from an inlined getter for Symbol.hasInstance.
89+ getterSetterOSRExitReturnPoint(op_instanceof, size)
90+ valueProfile(size, OpInstanceof, m_hasInstanceValueProfile, r1, r0, t2)
91+ storeValue(r1, r0, m_hasInstanceOrPrototype)
92+
93+.getPrototype:
94+ overridesHasInstance(m_hasInstanceOrPrototype, m_constructor, .instanceofCustom)
95+ isObject(m_value, .false)
96+ get(m_constructor, t5)
97+ metadata(t2, t6)
98+ loadConstantOrVariablePayload(size, t5, CellTag, t3, .getPrototypeSlow)
99+ performGetByIDHelper(OpInstanceof, m_prototypeModeMetadata, m_prototypeValueProfile, .getPrototypeSlow, size,
100+ macro (resultTag, resultPayload)
101+ storeValue(resultTag, resultPayload, m_hasInstanceOrPrototype)
102+ jmp .instanceof
103+ end)
104+ jmp .instanceof
105+
106+.getPrototypeSlow:
107+ callSlowPath(_llint_slow_path_get_prototype_from_instanceof)
108+ branchIfException(_llint_throw_from_slow_path_trampoline)
109+ jmp .instanceof
110+
111+.instanceof:
112+ callSlowPath(_llint_slow_path_instanceof_from_instanceof)
113+ dispatch()
114+
115+.throwStaticError:
116+ callSlowPath(_slow_path_throw_static_error_from_instanceof)
117+ dispatch()
118+
119+.instanceofCustom:
120+ callSlowPath(_slow_path_instanceof_custom_from_instanceof)
121+ dispatch()
122+
123+.false:
124+ get(m_dst, t5)
125+ storei BooleanTag, TagOffset[cfr, t5, 8]
126+ storei 0, PayloadOffset[cfr, t5, 8]
127+ dispatch()
128+end)
diff --git a/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.48.7.bb b/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.48.7.bb
index 6c105e7bb1..118592d42b 100644
--- a/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.48.7.bb
+++ b/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.48.7.bb
@@ -21,6 +21,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/webkitgtk-${PV}.tar.xz \
21 file://0001-Fix-build-errors-on-RISCV-https-bugs.webkit.org-show.patch \ 21 file://0001-Fix-build-errors-on-RISCV-https-bugs.webkit.org-show.patch \
22 file://fix-ftbfs-riscv64.patch \ 22 file://fix-ftbfs-riscv64.patch \
23 file://0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch \ 23 file://0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch \
24 file://0001-Fix-32bit-arm.patch \
24 " 25 "
25SRC_URI[sha256sum] = "2c62aebb608e09f930a539f3623a5cc8023b5068029f42a208f45f9124da6e30" 26SRC_URI[sha256sum] = "2c62aebb608e09f930a539f3623a5cc8023b5068029f42a208f45f9124da6e30"
26 27