Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
4b6ef48
Avoid linker OOM with GCC on armv7
eugeneia Oct 4, 2024
38d38dd
[ARMv7] Muffle cast-align warning on GCC for spanReinterpretCast
eugeneia Oct 8, 2024
1ba1093
[JSC][armv7] Set callee tag in wasm_to_js_wrapper_entry
eugeneia Feb 25, 2025
3e17bda
Handle wide Air::Arg offsets
aoikonomopoulos Feb 26, 2025
b1eedb3
[JSC][armv7] Fix BBQJIT::F64CopySign on armv7
eugeneia Feb 27, 2025
d06a7ff
[ARMv7] Build-webkit should support --32-bit on ARM64
justinmichaud Feb 27, 2025
f162d84
[JSC] Fix integer overflow on armv7 in CompleteSubspace::tryAllocateSlow
eugeneia Mar 10, 2025
0a00ebb
[JSC][armv7] Fix YarrInterpreter alignment checks
eugeneia Mar 11, 2025
a1478c6
[ARMv7] Fix wasm to js when useJIT=0
justinmichaud Mar 12, 2025
d65f2fa
[JSC][armv7] Verify MacroAssemblerARMv7::branch32 usage in debug builds
eugeneia Mar 24, 2025
34d9e5f
ResourceLoadInfo: fix compilation if VIDEO or is not enabled
ThomasDevoogdt Mar 25, 2025
5f0c5fd
[ARMv7] Skip branch compaction when diff would cause misalignment
justinmichaud May 27, 2025
fec1390
[JSC] Fix ARMv7 segfault in BBQJIT by avoid the use of `wasmScratchGPR`
sosukesuzuki Jul 9, 2025
0fb92d1
Add additional padding for patchable jumps and calls on armv7
justinmichaud Jul 14, 2025
73e0fdd
[ARMv7] Add padding to align patchable calls
justinmichaud Jul 21, 2025
7566b7f
[ARMv7] Set temporaryCallFrame in WebAssembly.asm
aoikonomopoulos Jul 31, 2025
3f7735b
[ARMv7] Avoid unaligned strd
justinmichaud Jul 31, 2025
3bdd57d
[JSC] Fix shiftI64 spilling only on one side of a branch on 32-bit
mikhailramalho Aug 29, 2025
1438b53
[ARMv7] Opt out of LLD on 32-bits
aoikonomopoulos Sep 5, 2025
5f1bffb
[ARMv7] Preserve return address without ISA mode bit
aoikonomopoulos Sep 26, 2025
e10c8ea
Thumb mode not detected on gcc for arm
efecanicoz-atlas Oct 7, 2025
959dfa7
[JSC][32-bit] Fix missing move when shift == 0 in BBQ
mikhailramalho Oct 14, 2025
91cabb8
[JSC] Added missing r3 store on armv7's jit.print
mikhailramalho Oct 15, 2025
43159f9
[run-javascriptcore-tests] Allow running armv7 tests on native aarch64
aoikonomopoulos Oct 24, 2025
938492f
[JSC][32-bit] Fix BBQ's I64Or
mikhailramalho Nov 11, 2025
2c38e34
[JSC][ARMv7] Don't issue a ldrd when the register holding the address…
mikhailramalho Nov 14, 2025
aa5da39
[JSC][32-bit] Optimize test32 and compare32 with branchless code gene…
mikhailramalho Nov 20, 2025
0dbb525
[32-bit] Armv7 tail call shuffler should not run out of registers whe…
justinmichaud Jan 14, 2026
1426d3f
[CMake] Fix a race in the jsc-armv7 build
geoffreygaren May 21, 2026
267784f
CodeBlock should reset its StubInfo when jettisoned
danlliu Apr 4, 2025
697c992
LLInt GetByIdModeMetadata should not hold potentially dead structure IDs
danlliu Apr 4, 2025
d05f2a3
[JSC] Eagerly unlinking CodeBlock when jettisoning
Constellation Jun 13, 2025
8fdd69f
[JSC] Avoid dangling pointers in WeakBlock list
dhecht Sep 2, 2025
6afc2ab
Exclude non-user portions of the main thread stack from stack scannin…
justinmichaud May 29, 2025
3c80bde
Clamp setCurrentTimeFromBindings to prevent negative time
calvaris Sep 4, 2024
f73bafe
[HTMLMediaElement] Reschedule timeupdate event if fired too early
eocanha Sep 6, 2024
1ae2964
[WPE] AcceleratedSurfaceLibWPE::clientResize should use the given size
carlosgcampos Jan 13, 2025
70e1c27
[EME][Thunder] Avoid crashing with null answers during session load
calvaris Jul 30, 2025
c0bb02e
unreviewed unified build fixes
justinmichaud Jul 8, 2026
f6c5313
[JSC] GetByIdModeMetadata's mode needs to be set when not using 64bit…
Constellation Apr 7, 2025
324a849
[JSC][ARMv7] test32 must use AND, not EOR, when materializing Zero/No…
justinmichaud Jul 9, 2026
5a67a87
Revert 287649@main since it breaks tests on ARM64
kmiller68 Jan 29, 2025
48ec0a4
[ARMv7] [Re-Land] Implement OMG tail calls
justinmichaud Mar 13, 2025
821083e
[JSC] Do not use stored call-site-index for OMG
Constellation Feb 6, 2025
55bf779
Set the opcode origin correctly on Wasm OMG IR Generator for 32bit CPUs
ioannad May 3, 2025
64c05d4
Js/Wasm engine produce an invalid ref.cast runtime fail for func.ref …
Constellation Jun 6, 2025
0414456
[ARMv7] Store CallSiteIndex when throwing exceptions in OMG
aoikonomopoulos Sep 9, 2025
1bc5fe0
[ARMv7] OMG: clarify where the inputs into try_table catch handler bl…
aoikonomopoulos Sep 19, 2025
fe2165d
[ARMv7] Sync prepareForTailCallImpl with upstream's final pre-deletio…
justinmichaud Jul 9, 2026
2afec45
[ARMv7] Load RTT values as pointer-typed in WasmOMGIRGenerator32_64
justinmichaud Jul 9, 2026
ed5806c
[ARMv7] Complete the no-stored-call-site-index conversion for OMG exc…
justinmichaud Jul 9, 2026
c1c9043
[ARMv7] Fix up exception-origin conversion in non-setGenerator lambdas
justinmichaud Jul 9, 2026
54dc779
[ARMv7] Include JSCJSValueInlines.h in WasmFaultSignalHandler for non…
justinmichaud Jul 9, 2026
3cfae84
Wasm OMG + BBQ fixes
justinmichaud Jul 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 137 additions & 0 deletions JSTests/stress/tail-call-register-pressure.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
"use strict";

function getModuleExports() {
return () => {}
};

function ownKeys(ee, te) {
var re = Object.keys(ee);
if (Object.getOwnPropertySymbols) {
var ne = Object.getOwnPropertySymbols(ee);
te && (ne = ne.filter((function(te) {
return Object.getOwnPropertyDescriptor(ee, te).enumerable
}))),
re.push.apply(re, ne)
}
return re
}

function _objectSpread(ee) {
for (var te = 1; te < arguments.length; te++) {
var re = null != arguments[te] ? arguments[te] : {};
te % 2 ? ownKeys(Object(re), !0).forEach((function(te) {
getModuleExports()(ee, te, re[te])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(ee, Object.getOwnPropertyDescriptors(re)) : ownKeys(Object(re)).forEach((function(te) {
Object.defineProperty(ee, te, Object.getOwnPropertyDescriptor(re, te))
}))
}
return ee
}

var ae = {
cleanAndTrimSelfLink: function() {
}
};

var browseItems = function(ee, te, re) {
function parseBrowseItem(ee, te, re, ne, ie) {
var ce, le, de, he;
if (ee.hasEmbedded("linearInfo")) {
var fe = ee.getEmbedded("linearInfo"),
pe = Object(ae.cleanSelfLink)(fe.getFirstAction("channel").getRawActionUrl());
if (!ne[pe] && !ie) return;
}

var ge = function parseBrowseItemUrl(ee, te) {
var re = ee.getProp("entityId"),
ne = ee.getProp("entityType"),
ie = ee.getProp("seriesProgramId"),
oe = ee.getProp("_type");
return "entity/".concat(re)
}(ee, he),
me = ee.getProps();
if (("NETWORK" !== te || ee.hasEmbedded("contentProvider")) && ("3X4_PROGRAM_LINEAR" !== te || ee.hasEmbedded("linearInfo"))) {
var ve = ee.hasAction("programImageLink") ? ee.getFirstAction("programImageLink") : re.programImageLink,
Se = ee.hasAction("programFallbackImageLink"),
_t = Se ? ee.getFirstAction("programFallbackImageLink") : re.programFallbackImageLink;

var Et, kt, Tt, Pt = _t.setParams(de).getActionUrl();
return Et = Se ? Pt : ve.setParams(de).getActionUrl(), me.contentRating && me.contentRatingScheme && (kt = {
scheme: me.contentRatingScheme,
name: me.contentRating
}), (null === (ce = me.ordering) || void 0 === ce ? void 0 : ce.criticScore) && (null === (le = me.ordering) || void 0 === le ? void 0 : le.fanScore) && (Tt = {
rt: {
criticScore: Math.floor(me.ordering.criticScore),
criticCertified: Math.floor(me.ordering.criticScore) >= 75,
criticRotten: Math.floor(me.ordering.criticScore) < 60,
fanScore: Math.floor(me.ordering.fanScore),
fanRotten: Math.floor(me.ordering.fanScore) < 60
}
}), _objectSpread({
_type: me._type
}, me.adBrand && {
adBrand: me.adBrand
}, {}, me.entityId && {
entityId: me.entityId
}, {}, me.entityType && {
entityType: me.entityType
}, {}, me.episodeNumber && {
episodeNumber: me.episodeNumber
}, {}, he && {
linearInfo: he
}, {}, me.numberOfEpisodes && {
numberOfEpisodes: me.numberOfEpisodes
}, {}, me.programType && {
programType: me.programType
}, {}, kt && {
rating: kt
}, {}, Tt && {
reviews: Tt
}, {}, me.hasDVS && {
dvs: me.hasDVS
}, {}, me.isHD && {
hd: me.isHD
}, {}, me.closedCaption && {
cc: me.closedCaption
}, {}, me.isSAP && {
sap: me.isSAP
}, {}, me.releaseYear && {
releaseYear: me.releaseYear
}, {}, me.seasonNumber && {
seasonNumber: me.seasonNumber
}, {}, me.seriesTitle && {
seriesTitle: me.seriesTitle
}, {}, {
tileRenderStyle: me.tileRenderStyle || te,
title: me.title,
subtitle: me.subtitle,
image: Et,
fallbackImage: Pt,
url: ge
})
}
}

return parseBrowseItem(ee, te, re,{},{})
}

const runTest = function() {
for (var i = 1; i < 100; ++i) {
browseItems(
{
hasAction: () => {},
hasEmbedded: (i) => { return i === "contentProvider"; },
getProp: () => { return undefined },
getProps: () => { return {} },
getFirstAction: () => { return { getRawActionUrl: () => "url" } },
},
{},
{
programImageLink: { setParams: () => { return { getActionUrl: () => "programImageLink" }; } },
programFallbackImageLink: { setParams: () => { return { getActionUrl: () => "programFallbackImageLinkrl" }; } },
}
)
}
}

runTest()
29 changes: 29 additions & 0 deletions JSTests/wasm/stress/bbq-i64-unaligned-load-store.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//@ requireOptions("--useConcurrentJIT=false")
// Regression test for unaligned i64 memory access under BBQ on ARMv7.
// BBQ compiled wasm i64.load/i64.store with ldrd/strd, which fault on unaligned
// addresses on ARMv7 -- but wasm permits unaligned memory access. Round-tripping an
// i64 through an unaligned address therefore crashed (SIGBUS) once BBQ kicked in.

// (module
// (memory 1)
// (func (export "roundtrip") (param $off i32) (param $v i64) (result i64)
// local.get $off local.get $v i64.store
// local.get $off i64.load))
const bytes = new Uint8Array([
0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, // \0asm v1
0x01, 0x07, 0x01, 0x60, 0x02, 0x7f, 0x7e, 0x01, 0x7e, // type: (i32,i64)->i64
0x03, 0x02, 0x01, 0x00, // func 0
0x05, 0x03, 0x01, 0x00, 0x01, // memory: min 1 page
0x07, 0x0d, 0x01, 0x09, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x74, 0x72, 0x69, 0x70, 0x00, 0x00, // export "roundtrip"
0x0a, 0x10, 0x01, 0x0e, 0x00, 0x20, 0x00, 0x20, 0x01, 0x37, 0x03, 0x00, 0x20, 0x00, 0x29, 0x03, 0x00, 0x0b, // code
]);

const { roundtrip } = new WebAssembly.Instance(new WebAssembly.Module(bytes)).exports;

const V = 0x1122334455667788n;
for (let i = 0; i < 100000; i++) {
// offset 1 is unaligned; ldrd/strd would fault on ARMv7 once BBQ-compiled.
const got = roundtrip(1, V);
if (got !== V)
throw new Error("unaligned i64 roundtrip at iteration " + i + ": got 0x" + got.toString(16));
}
31 changes: 31 additions & 0 deletions JSTests/wasm/stress/omg-array-new-i32-init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//@ requireOptions("--useConcurrentJIT=false")
// Regression test for array.new with a 32-bit init value under OMG on ARMv7.
// operationWasmArrayNew() takes the init value as a uint64_t. The 32-bit OMG
// generator passed an i32 init as a single word, so the ABI put it in a register
// while the callee read the uint64_t from an uninitialized stack slot -- filling
// the array with a stray value instead of the requested init.

// (module
// (type $arr (array (mut i32)))
// (func (export "f") (param i32) (result i32)
// local.get 0
// i32.const 3
// array.new $arr
// i32.const 1
// array.get $arr))
const bytes = new Uint8Array([
0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, // \0asm v1
0x01, 0x09, 0x02, 0x5e, 0x7f, 0x01, 0x60, 0x01, 0x7f, 0x01, 0x7f, // type: array(mut i32); (i32)->i32
0x03, 0x02, 0x01, 0x01, // func 0 has type 1
0x07, 0x05, 0x01, 0x01, 0x66, 0x00, 0x00, // export "f"
0x0a, 0x10, 0x01, 0x0e, 0x00, 0x20, 0x00, 0x41, 0x03, 0xfb, 0x06, 0x00, 0x41, 0x01, 0xfb, 0x0b, 0x00, 0x0b, // code
]);

const f = new WebAssembly.Instance(new WebAssembly.Module(bytes)).exports.f;

for (let i = 0; i < 100000; i++) {
// f(v) allocates i32[3] filled with v and returns element 1, which must equal v.
const got = f(0x2a);
if (got !== 0x2a)
throw new Error("array.new i32 init: f(0x2a) should be 0x2a, got " + got + " at iteration " + i);
}
33 changes: 33 additions & 0 deletions JSTests/wasm/stress/omg-test32-distinct-registers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//@ requireOptions("--useConcurrentJIT=false")
// Regression test for test32(Zero/NonZero, op1, op2, dest) with op1 != op2 on ARMv7:
// materializing (op1 & op2) == 0 must use AND, not EOR (EOR computes op1 == op2).
// OMG fuses i32.eqz(i32.and(a, b)) into a single materialized Test32, which is the
// only tier that exercises the distinct-register form.
// https://bugs.webkit.org/show_bug.cgi?id=302016 (regressed in 303329@main)

// (module
// (func (export "f") (param i32 i32) (result i32)
// local.get 0
// local.get 1
// i32.and
// i32.eqz))
const bytes = new Uint8Array([
0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, // \0asm v1
0x01, 0x07, 0x01, 0x60, 0x02, 0x7f, 0x7f, 0x01, 0x7f, // type: (i32,i32)->i32
0x03, 0x02, 0x01, 0x00, // func
0x07, 0x05, 0x01, 0x01, 0x66, 0x00, 0x00, // export "f"
0x0a, 0x0a, 0x01, 0x08, 0x00, 0x20, 0x00, 0x20, 0x01, 0x71, 0x45, 0x0b, // code
]);

const f = new WebAssembly.Instance(new WebAssembly.Module(bytes)).exports.f;

for (let i = 0; i < 300000; i++) {
// (2 & 1) == 0, but 2 != 1: EOR-based Zero materialization returns 0 instead of 1.
let got = f(2, 1);
if (got !== 1)
throw new Error("f(2, 1) should be 1 ((2&1)==0), got " + got + " at iteration " + i);
// (3 & 1) != 0 and 3 != 1: both idioms agree; guards the NonZero path shape too.
got = f(3, 1);
if (got !== 0)
throw new Error("f(3, 1) should be 0 ((3&1)!=0), got " + got + " at iteration " + i);
}
Binary file not shown.
Loading