mirror of
https://github.com/siemens-mobile-hacks/pmb887x-emu-web.git
synced 2026-11-25 22:27:22 +00:00
qemu: review round of 2026-11-21 against smh/master, 29 fixes and the fork closer to upstream
Bumps the qemu gitlink from 133f91266b to 94754705d1, 62 commits of a review of the fork against smh/master 3403936c99: 29 defects fixed (QBUG-1..27) and 49 reductions, among them the wasm64 translator and the DSP fast loops moved into .c.inc files of their own, R5 on wasm64 only, the bswap and inverted-operand emitters through TCG's generic expansion and the never-taken general 35BE iteration gone. git diff --stat against 3403936c99: +19,802/-519 -> +18,722/-377. Whole candidate against 133f91266b, free-run: towerblox +1.5 %, bobby +1.7 %, midi +0.7 %, video MIPS -0.5 % (12 rounds, se ~0.35); S75 and KE970 boots within noise. stopwatch, music, idle and the EL71 boot were not measured: EL71v41lg91.bin was missing from the container. doc/version-pins.md has the entry, doc/wasm-fast-paths.md the changed rows, the marking and "Returned to upstream", and doc/performance.md the History row and a "2026-11-21 review cleanup" section with the numbers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
856ffb4aaa
commit
5b8db6979f
4 changed files with 168 additions and 37 deletions
|
|
@ -423,6 +423,9 @@ always revert with `git apply -R`.
|
|||
- **Profile shares across builds:** function shares are not comparable,
|
||||
because Binaryen inlining shifts (`helper_teak_tcg_chain` read 1.5 % vs
|
||||
5.9 % after a peripheral-only change). Use an A/B.
|
||||
- **A missing flash:** on 2026-11-21 the container had no `EL71v41lg91.bin`,
|
||||
so stopwatch, music, idle and the EL71 boot (bootbench `el71`) could not
|
||||
run; the boot A/Bs used the S75 and KE970 boots.
|
||||
- **Dist names:** the host mount is case-insensitive, so dists whose names
|
||||
differ only in case collide. Use unique lowercase names.
|
||||
- **`WEB_DIST` must be absolute.** A relative path lands in
|
||||
|
|
@ -611,7 +614,7 @@ bash scripts/gate.sh close --dist dist-x # before the last commit of a
|
|||
The DSP state matches at every common slice point (2026-11-03).
|
||||
- **The fold counts instructions at TB entry.** The wasm64 prologue adds
|
||||
the whole TB, and an unwind (io_recompile rewind, SMC restart, fault)
|
||||
hands back what did not run (`w64_acct_unwind`). Before `4fc6ac6dc7` it
|
||||
hands back what did not run (`w64_acct_adjust()`). Before `4fc6ac6dc7` it
|
||||
did not, each rewind left the count ahead, and the `LS_QARGS` run diverged
|
||||
wherever rewinds were frequent, which is what A5's barriers prevented.
|
||||
|
||||
|
|
@ -630,7 +633,7 @@ counts instructions that the native plugin does not count**, so from
|
|||
1. **TB-start exits.** The prologue charges a TB's instructions before the
|
||||
TB's own exit check (`gen_tb_start`: icount budget, exit request). A TB
|
||||
that leaves there runs nothing, but the charge stays: `cpu_tb_exec` does
|
||||
not hand it back on `TB_EXIT_REQUESTED`, and `w64_acct_unwind` covers
|
||||
not hand it back on `TB_EXIT_REQUESTED`, and `w64_acct_adjust()` covers
|
||||
unwinds only. The plugin's inline counter sits after that check. Such
|
||||
exits are deterministic (the icount refill every 65,535 instructions,
|
||||
deadlines, interrupts) plus host-timed exit requests. The first one is
|
||||
|
|
@ -1279,6 +1282,7 @@ contention, free-run) and do not compare across rows.
|
|||
| 2026-11-12 | `47d1ff26aa` (`9bf917bb6e`) | smh/master `0539060008`: the HD15515X transceivers (`hd155153np` moved, `hd155155npeb` added), the DSP modulator per hardware version (E001/E101 reset, MSTAT and read rate), gprscu reads of unknown registers. No conflict, no fast path touched. Free-run A/B, 8 pairs each (two rounds of 4): towerblox +0.8 %, stopwatch +0.1 %, bobby −0.1 %, video +1.4 %, midi −0.2 %, every round within its spread (sd 0.6–7.1) |
|
||||
| 2026-11-12 | `9de7811900` (`47d1ff26aa`) | Not a speed change: `ui/wasm.c` gets a network port for the page, the GSM cell's IP side in the browser (`site/gprs-net.js`, [gsm-network.md](gsm-network.md)). Nothing runs unless the page attaches, which it does only with the GSM option on, so no benchmark scene sees it; with it on, the page polls the port every 20 ms on its main thread |
|
||||
| 2026-11-14 | `48858038d9`, `133f91266b` (`7dd5289`, `1d34feb`) | Not a speed change, checked afterwards with the 419 parent commits of the review rounds (a9b40fe → b1c2a53), both legs built the same way with `tools/perf/freerun.diff` and served side by side. No benchmark runs the changed code: the exit wrap runs at exit, and the page polls `wasm_gsm_state` once a second only with the GSM option on, which the benchmarks untick. Free-run, HEAD against a9b40fe, pairs in both orders: stopwatch +1.2 % (8 pairs, se 1.5), towerblox +0.4 % (8, se 0.8), midi −0.2 % (8, se 0.2), bobby −1.5 % (16, se 0.4), video MIPS −0.7 % (16, se 0.4) and fps −0.7 % (16, se 0.2); the A/A rounds read −1.0 to +1.0 %. Paced, host CPU (lower is better): stopwatch −0.9 %, towerblox +0.3 %, bobby +0.3 % (8 pairs each, se 0.4–0.7). EL71 boot burst (`bootab.sh`): +0.3 % and −2.0 % in the two orders, so HEAD was 0.85 % faster on average; tIdle 30.6 s on both. idlebench, S75, 4 runs each: tIdle 23.4 s on both, guest 1G at 17.3 s on both. uibench MIPS, keylag (v/wall 1.00 on both) and loadbench are the same. The bobby and video differences are placement. The hot DSP functions have the same bodies, but 20326 of 20715 functions changed index: `__wrap_exit`, `wasm_gsm_state` and the uint8 property accessors come early. The qemu-only legs carry the difference (bobby −0.9 %, se 0.9), and the page-only legs do not (+0.1 %, se 1.3). There is nothing to fix |
|
||||
| 2026-11-21 | `94754705d1` (`133f91266b`) | Review of the fork against smh/master `3403936c99`: 29 defects fixed, 49 reductions towards upstream (version-pins.md has the list, wasm-fast-paths.md the rows; the numbers are in 2026-11-21 review cleanup, below). Whole candidate against `133f91266b`, free-run, 4 pairs a round: towerblox +1.5 % (4 rounds), bobby +1.7 % (2), midi +0.7 % (2), video MIPS −0.5 % over 12 rounds (se ~0.35; 8 of them on the scene-identical tree `bf626e1fcd`). Boot (bootab.sh, lower = faster): S75 burst +0.1 %, audioMs +0.5 % (4 rounds); KE970 burst −0.35 %, audioMs +1.5 % (2 rounds, se ~3). stopwatch, music, idle and the EL71 boot were not measured: `EL71v41lg91.bin` was missing from the container |
|
||||
|
||||
## 2026-11-04 deviation cleanup
|
||||
|
||||
|
|
@ -1372,3 +1376,95 @@ quantum has 2.7–2.9 ms.
|
|||
scope has no `performance`, `Date` sees the dutyhost stops, and its console
|
||||
output does not reach Playwright (stats have to go through the ring
|
||||
header).
|
||||
|
||||
## 2026-11-21 review cleanup
|
||||
|
||||
The round reviewed every fork deviation against smh/master `3403936c99`,
|
||||
fixed 29 defects and returned what neither speed nor correctness needs,
|
||||
without losing anything on any scene (rule 5). The base was `133f91266b`,
|
||||
the final tree `94754705d1`. What went back to upstream is listed in
|
||||
[wasm-fast-paths.md](wasm-fast-paths.md) under "Returned to upstream"; the
|
||||
rows there give the cost of removing each path that was priced and kept.
|
||||
|
||||
All free-run (`tools/perf/swab.sh`, bounds checks, 4 pairs × 20 s per
|
||||
round), both dists built with `tools/perf/freerun.diff` from one build
|
||||
directory with `scripts/build-qemu-wasm64.sh`'s flags. Each value is one
|
||||
round's change of the candidate in vratio (video: MIPS), in percent,
|
||||
negative meaning slower than the base; rounds alternate which side runs
|
||||
which dist. The host's 32 threads were shared with other tenants; one
|
||||
stretch at load ~45–58 was discarded (video sd ~10 %). stopwatch, music and
|
||||
idle could not run: the container has no `EL71v41lg91.bin` (scenebench's
|
||||
EL71 image), and neither could bootbench's `el71`.
|
||||
|
||||
| Scene | Rounds (candidate vs base, %) | Mean |
|
||||
|---|---|---|
|
||||
| towerblox | +1.10, +3.46, +1.35, +0.13 | +1.5 |
|
||||
| bobby | +2.67, +0.70 | +1.7 |
|
||||
| midi | +0.26, +1.19 | +0.7 |
|
||||
| video (MIPS) | −0.25, −1.00, −2.06, +0.42; scene-identical tree `bf626e1fcd`: −0.29, −0.56, −2.38, +0.19, +0.23, −1.03, −0.87, +2.05 | −0.5 over 12 (se ~0.35) |
|
||||
| A/A towerblox | −1.43; −0.04 (`bf626e1fcd`); −1.38, −1.41 (earlier) | |
|
||||
| S75 boot burst (bootab.sh, lower = faster) | −0.6, +0.4, +2.1, −1.4 | +0.1 |
|
||||
| S75 boot audioMs | −1.3, −0.3, +3.5, 0.0 | +0.5 |
|
||||
| KE970 boot burst | +0.3, −1.0 | −0.35 |
|
||||
| KE970 boot audioMs | +1.4, +1.6 (se ~3) | +1.5 |
|
||||
|
||||
The final tree differs from `bf626e1fcd` only in the C6 stash (boot path,
|
||||
~1 flip a second in the scenes) and QBUG-14, so its video rounds are
|
||||
pooled.
|
||||
|
||||
- **How the candidate got there.** The first candidate `012b3cae87` (with
|
||||
QDEV-9, QDEV-12 and QDEV-16) lost: towerblox −2.2, −1.9, −3.0, −1.3,
|
||||
−1.0, +1.3, −0.9; video −0.9, −2.1, −0.4; midi 0.0, −1.2, −1.2; bobby
|
||||
+1.0, +0.1, +1.2, +1.4.
|
||||
- **Bisect.** The inverted-operand emitters restored: towerblox −0.3 / +0.2
|
||||
(neutral). QDEV-9, QDEV-12 and the QBUG-3 test removed: towerblox
|
||||
−1.0 / +0.25, video +1.2, +2.5, +1.1, +0.5 (faster without). Then
|
||||
separately against `59f7a5f621` (QDEV-9 already out): without QDEV-12
|
||||
video +1.7 (−0.8, +1.4, +4.1, +2.3); without the QBUG-3 condition 0.0
|
||||
(+0.8, +0.7, −0.9, −0.5). Towerblox at the history midpoint `7e751483bb`:
|
||||
base → mid −0.8 / +1.3, mid → candidate +1.5 / −1.9 (noise).
|
||||
- **QDEV-16** (no stash) against the stash, S75 boots: audioMs worse by
|
||||
3.2, 18.6, 3.6, 5.3, 4.7 and 4.2 %; burst −2.0..+0.2.
|
||||
|
||||
Pricing of the gated reductions, against `012b3cae87`, in percent:
|
||||
|
||||
| Item | Change measured | towerblox | bobby | midi | video MIPS |
|
||||
|---|---|---|---|---|---|
|
||||
| QDEV-15 (C5) | no fill-time TLB grow | −15.4 (se 1.0) | −9.5 (se 1.6) | | |
|
||||
| QDEV-21 (A7) | `bql_unlock_mmio` always unlocks | −3.1 (se 0.8) | +0.2 (se 2.2) | | −4.9 (se 0.7) |
|
||||
| QDEV-34 | P7, P8's shift, the 14/15 arm at upstream's forms | −1.8 (se 1.4) | −1.1 (se 1.8) | −3.6 (se 0.7) | +0.05 (se 0.4) |
|
||||
|
||||
Census (temporary counters, per guest second over the scene window):
|
||||
|
||||
| | bobby | towerblox | midi | video | EL71 boot+idle |
|
||||
|---|---|---|---|---|---|
|
||||
| fused MMIO ld / st | 35.4k / 29.0k | 44.2k / 30.0k | 1.20M / 32.6k | 476k / 38.1k | 528k / 37.5k |
|
||||
| per-piece loop fast arms ld / st (slow: 0) | 1.7k / 0.8k | 1.5k / 0.9k | 0.8k / 0.6k | 1.1k / 0.6k | 1.2k / 0.06k |
|
||||
| i2s_tx_write / i2s_rx_read | 21.1k / 21.1k | 17.9k / 17.9k | 16.3k / 0 | 4.8k / 4.8k | 0 |
|
||||
| dmac_fifo_drain = sink_mr path | 508 | 3.7k | 44.2k | 111k | 60 |
|
||||
| 35BE flat iterations / general | 13.4k / 0 | 12.9k / 0 | 6.1k / 0 | 2.4k / 0 | 8.0k / 0 |
|
||||
| romd/readonly variant changes per run, same / different layout | 1,306 / 0 | 1,302 / 0 | 468 / 0 | 468 / 0 | 846 / 0 |
|
||||
|
||||
- **Validation of `94754705d1`:** `scripts/gate.sh keep` and `close` on the
|
||||
final dist, every job green except `firefox`, which cannot run in this
|
||||
container (the Playwright Firefox needs NSS 3.126, the system has 3.120;
|
||||
and ffboot's GPRS gateway wants a `gprs-gw` checkout at
|
||||
`/bts-emulator/gprs-gw`). op-suite 1312/1312 on native JIT, TCI and wasm,
|
||||
wasm serial identical; boot-ordered, the five board boots and early keys;
|
||||
`native`; `lockstep-wasm` 250e6; `lockstep-native` 3/3 clean to 2.5e9;
|
||||
`lockstep-full` 3/3 clean to 2.5e9 (298 SRAM digests each); detect,
|
||||
efa-web, ui.
|
||||
- **`LS_QARGS` lockstep** (real TBs, superblocks, io_recompile rewinds): no
|
||||
divergence over the range both legs reached, S75 to ~0.95G (113 SRAM
|
||||
digests identical) and EL71 to ~0.80G (95 SRAM + 95 SDRAM digests
|
||||
identical). The runs end there because `tools/lockstep-wasm.mjs` stops
|
||||
when the wasm leg reaches the budget and assumes the native leg is the
|
||||
faster one; on this host the one-insn-per-TB native leg runs ~23M
|
||||
insns/s against ~60M on the wasm side, so no budget completes. Worth a
|
||||
tool change (keep reading the native leg until it reaches the budget).
|
||||
- **Eviction:** `W64_LIVE_MAX` 256 (temporary build), `lockstep-wasm` to
|
||||
1e9: clean (119 SRAM digests, serial identical).
|
||||
- **DSP translator changes:** native old (`133f91266b`) against new binary
|
||||
(`tools/lockstep.mjs`), EL71 and S75 to 1e9: both clean (962 epochs + 120
|
||||
memory digests identical). DSP unit tests (`test-pmb887x-dsp-tcg`): 53/53
|
||||
after every DSP commit.
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ Why the series was based on dsp-lle before the DSP LLE reached master: master al
|
|||
|
||||
## qemu (the `qemu/` gitlink; `QEMU_PMB887X_REV` before 2026-11-14)
|
||||
|
||||
- `94754705d1` (2026-11-21) review of the fork against smh/master 3403936c99 (29 defects, 49 reductions). Fixed: an inlined call after a cross-page absorbed branch broke `tb->size` (QBUG-1), the fill-time TLB grow lost the large-page record (QBUG-2), a deferred MMIO BQL hold that nothing bounded without icount or vcpu-timers (QBUG-3), GPTU T012RUN not re-arming T0/T1 (QBUG-4), back-edges across an instruction-set switch (QBUG-5), superblocks under memory timing (QBUG-6), the back-edge's instruction count before its budget exit (QBUG-7), next-TB cache fills for memory-timed TBs and under breakpoints (QBUG-10), a screendump resumed on the vCPU thread (QBUG-13), an uninitialised dif_v2 read (QBUG-16), the DSP chain memo across frees (QBUG-17), leaks of evicted batches' records and abandoned translations' interpreter records and the 32 MB record store (QBUG-24..26), the batch state per thread (QBUG-27), and stale comments. Closer to upstream: the wasm64 translator and the DSP fast loops in `.c.inc` files of their own (translate.c's deviation 1,904 -> 273 lines, dsp/tcg.c's 2,863 -> 1,261), R5 on wasm64 only, the bswap and inverted-operand emitters through TCG's generic expansion, the general 35BE iteration gone (a census: never taken), lab-notebook comments trimmed. `git diff --stat 3403936c99`: +19,802/-519 -> +18,722/-377 (in upstream's own files +11,002/-519 -> +7,745/-377; ~2,900 lines moved into fork-owned files). Priced and kept: C5 (towerblox -15.4 % without it), A7's deferral (towerblox -3.1 %, video -4.9 %), the C6 stash (S75 boot audio +3..19 % without it), C1's per-piece loops (video -1.7 %), P7/P8/the 14/15 arm (midi -3.6 %), R2's rebuild drop. Whole candidate against 133f91266b, free-run: towerblox +1.5 %, bobby +1.7 %, midi +0.7 %, video MIPS -0.5 % (12 rounds, se ~0.35); boots in performance.md History. stopwatch, music, idle and the EL71 boot were not measured in this round: EL71v41lg91.bin, the image they need, was missing from the container
|
||||
- `133f91266b` (2026-11-14) gsm-bts records what it answered the phone, as the read-only property `ms-state` (registered, GPRS attached, PDP context active), and ui/wasm's `wasm_gsm_state()` hands it to the page's network badge. The fork's first change to upstream's hw/gsm besides 9bf917bb6e: twelve lines in gsm-bts.h, gsm-bts.c and gsm-bts-gprs.c, each marked `WASM PORT (removable)`, approved by the owner for this feature only
|
||||
- `48858038d9` (2026-11-14) an `exit()` from a thread that holds the BQL runs the exit notifiers on that thread, as on a native host: a start-up error (an unknown option, a board without a display, error_fatal) no longer freezes the page. From here the gitlink is the pin
|
||||
- `8fb9035755` (2026-11-13) ui/wasm: `wasm_send_key_after`, key edges spaced in guest time, for the page's typing. The gitlink moved here while `QEMU_PMB887X_REV` stayed at d992a03bf8, so build-qemu.sh would have moved qemu back to an engine without that export
|
||||
|
|
|
|||
|
|
@ -21,7 +21,11 @@ upstream, or when deleting an optimization to bring a file back towards upstream
|
|||
`cc1c25a551`) are in the backend and its DSP glue (evicted DSP blocks
|
||||
dropped in the middle of a slice, a rebinder for Firefox's tiers,
|
||||
constant addresses for V8's bounds-check elimination, a typed chain
|
||||
table), which are not itemized.
|
||||
table), which are not itemized. The 2026-11-21 review round
|
||||
(`94754705d1`, against smh/master `3403936c99`) changed the A1, A2, A3,
|
||||
A7, A9, A10, C1, C3, C5, C6, R2, R3, R4, R5, R6, R7, R8, D1, D6, D10, P1,
|
||||
P6, P7, P8, P10 and B1 rows, the marking, the list of correctness fixes
|
||||
and "Returned to upstream"; what those name was grepped at `94754705d1`.
|
||||
- **Numbers** are quoted from the commit messages
|
||||
(`git -C qemu log -1 <sha>`) and from the A/Bs of their date; September
|
||||
figures were measured under icount. "Not measured" means no source gives
|
||||
|
|
@ -63,7 +67,8 @@ The following are **porting necessities, not fast paths**, and are not itemized:
|
|||
on purpose.
|
||||
- **Correctness fixes:**
|
||||
- the instruction count handed back when a TB is unwound
|
||||
(`w64_acct_unwind` in `translate-all.c`)
|
||||
(`w64_acct_adjust()`, one inline in `exec/translation-block.h`, also
|
||||
used by the fill helpers)
|
||||
- 32-bit operands zero-extended when they sit in a 64-bit local
|
||||
(`w64_get_u32`: `mulu2`, `muluh`, the `qemu_ld`/`qemu_st` address)
|
||||
- DSP blocks dropped when their batch is evicted
|
||||
|
|
@ -74,8 +79,12 @@ The following are **porting necessities, not fast paths**, and are not itemized:
|
|||
- the `a32.decode` compare-Rd fix
|
||||
- the LG fix in dif_v2.c (`dif_defer_tx_isr`)
|
||||
- the `ppm_save` row stride (`ui/ui-qmp-cmds.c`)
|
||||
- `gen_eret_end_tb`'s IRQ fix
|
||||
- `w64_eret_end_tb`'s IRQ fix
|
||||
- the flag-masked victim-TLB compare
|
||||
- the large-page record kept across C5's grow (QBUG-2)
|
||||
- the deferred BQL release only under icount/vcpu-timers (QBUG-3)
|
||||
- GPTU T012RUN re-arming T0/T1 (QBUG-4)
|
||||
- inline records stored aligned (QBUG-11)
|
||||
|
||||
## Marking
|
||||
|
||||
|
|
@ -89,9 +98,16 @@ Each entry's **Mark** column says how isolated the fast path is:
|
|||
| **all** | Inline in shared code, unmarked, and compiled into native builds too. Native lockstep and reference runs execute it |
|
||||
|
||||
Today R6, A9, A10 and A11 carry the comment: each has its own file, plus MARK
|
||||
comments on its hooks. D6's `dma_sink_write_block_mr`, D9's hunks in
|
||||
`hw/lcd/lcd.c` and `hw/gpu/s1d13716/s1d13716.c`, and D11 are marked too.
|
||||
Everything else is unmarked and inline. New fast paths should follow R6's
|
||||
comments on its hooks. Since 2026-11-21 so do the wasm64 translator parts of
|
||||
A2, A3, R3, R4 and R8, in `target/arm/tcg/translate-w64.c.inc` and
|
||||
`translate-w64-block.c.inc` (files of their own; their hooks in
|
||||
`translate.c` are under `#ifdef CONFIG_TCG_WASM64`), and P1, in
|
||||
`hw/arm/pmb887x/dsp/tcg-fast.c.inc`, with its hooks in `tcg.c` marked. D6's
|
||||
`dma_sink_write_block_mr`, D9's hunks in `hw/lcd/lcd.c`,
|
||||
`hw/gpu/s1d13716/s1d13716.c`, `hw/ssi/ssi.c` and `ssi.h`, and D11 are marked
|
||||
too, as are the hooks of D1–D4, D6 and D8 in `dif_v2.c`, `dmac.c`, `dmac.h`
|
||||
and `gptu.c`, D7's in `tpu.c`, D10's in `hw/audio/i2s.c` and B1's block in
|
||||
`meson.build`. Everything else is unmarked and inline. New fast paths should follow R6's
|
||||
pattern: put the code in its own file, and give every hook in an upstream
|
||||
file the comment.
|
||||
|
||||
|
|
@ -123,27 +139,27 @@ before relying on it.
|
|||
|
||||
| ID | Where | What it does | Benefit | Remove | Check | Mark |
|
||||
|---|---|---|---|---|---|---|
|
||||
| A1 | `tb-jmp-cache.h` (`TB_JMP_CACHE_BITS 16`, `gen`, `tb_jmp_cache_key`), `tb-hash.h` (wasm64 `tb_jmp_cache_hash_func`), `translate-all.c` `tcg_flush_jmp_cache`, `cpu-exec.c` `tb_lookup` / `cpu_exec_loop` | Jump cache: 64K entries, one entry per halfword of a page with 2 TB-flag bits in the hash, and a full flush done as a generation bump | 16 bits: J2ME −5.6 % (3fb2c66465). Halfword hash: stopwatch qht lookups 60k → 6k per 2 s (5c8cf5bc65). Generation flush: neutral on S75, saves 1–10 % of CX70 idle with the 64K table (741597d60a) | Delete the wasm64 branches. The `(pc, flags)` signature of `tb_jmp_cache_hash_func` changed for all builds and can go back too | — | wasm (signature: all) |
|
||||
| A2 | `cpu-exec.c` `HELPER(lookup_tb_ptr_lc)`, the pc-cache probe in `HELPER(lookup_tb_ptr)`, `w64_lookup_tb_ptr_miss`, `w64_lc_fill`, `w64_pcc[]`, `w64_pcc_hash`, `w64_pcc_get`, `w64_pcc_put`, `w64_pcc_shape`, `HELPER(tb_key_gen_bump)`; `translate-all.c` `cpu_tb_key_gen_bump`, `w64_lc` init; generation bumps in `tb-maint.c`, `hflags.c` `arm_set_hflags`, `vfp_fpscr.c`, `translate-vfp.c`, `gdbstub.c`; `hflags.c` `arm_w64_lc_key`, `arm_w64_lc_key_pc`, `arm_w64_lc_key_layout`; `translation-block.h` `w64_lc`, `W64PccEnt`, `W64PccShape`; `translate.c` `gen_goto_ptr`, `w64_key_static`, `w64_abs_base`; the backend's `w64_pcc_call` (`tcg-target.c.inc`), `w64_pcc_probe` and its `pb_*` emitters and patching (`wasm64.c`), `w64_hint.pcc_call` (`wasm64.h`) | Inline next-TB cache on every goto_ptr: a per-TB slot, then a global pc-keyed table that the lookup helpers probe and that every batch module probes in a function of its own, which the exits call in the helper's place (TurboFan inlines it). A generation counter retires both caches when TB-key inputs change | Per-TB slot: stopwatch +7..9 % (62bdab8192). pcc table: +6.8 % (c7a12330d9). The probe as a function of each batch module (`36e3b3cc4c`): EL71 boot burst −6.5 % (se 0.7) against an inline probe at every exit (`d4380167b9`), free-run within ±1 % on every scene. With the probe only in the helpers, video loses 3–5 % (performance.md, Closed ideas). `w64_abs_base`: towerblox +2.4 % / +2.0 % with bounds checks (2e70b8bed0, 305999f747) | Return `gen_goto_ptr` to the upstream `tcg_gen_lookup_and_goto_ptr`. Drop the two helpers, the pcc table, the module's probe function and its call sites, the generation and all its bumps, and `HELPER(lookup_tb_ptr)`'s probe and `w64_lookup_tb_ptr_miss` (with its `return tb->tc.ptr` in the log branch) | — | wasm |
|
||||
| A3 | `translate.c`: `w64_back_edge`, `w64_defer_taken`, `w64_absorb`, `w64_abs_cross_page`, `w64_try_join`, `w64_inline_call`/`_return`, `w64_inl_*`, `w64_refund`, `w64_charge_cycles`, `w64_emit_deferred_taken`, `w64_emit_inline_misses` (the `#ifdef` span from `w64_acct_add` to `w64_key_static`, plus call sites in `gen_jmp_tb`, `trans_BX`, `trans_BL` and the insn loop); `translate.h` w64 fields; `translator.c` `w64_page1`, `w64_lin_end`, page-1 `translator_ld` and `translator_use_goto_tb`; `cpu-exec.c` `tb_lookup_cmp` `W64_INL_VPAGE1` probe, `tb_add_jump` inlined list, the `last_tb` keep; `tb-maint.c` `tb_page_span`, `w64_inl_cross_stream`, `tb_unlink_inlined`; `translate-all.c` `w64_inl_pending`, `w64_tb_insn_index`; `target/arm/cpu.c` CF_PCREL off and `pagebits ≥ 12`; `board.c` `minimum_page_bits = 12` | Superblocks (loops branch back inside the TB, short forward branches absorbed, join points) and inlining of BL/BX callees into the caller's TB, on 4 KB guest pages | Superblocks: stopwatch vratio 0.58 → 0.87, video −8 %, music −5 %, Bobby −4 % CPU (2ff4e374c3). Back-edge +7.65 %, join +6 %. Inlining + 4 KB pages: 18–19 % faster than inlining off; 4 KB beats 1 KB by ~8 % (September). Chaining to page 1: video +2.6 % (e149f370ff). Inlined-TB unlink list: up to 40 % of the vCPU in EL71 boot (99166ef386) | The entry points are the six functions called from `gen_jmp_tb`, `trans_BX`, `trans_BL` and the insn loop. With all six refusing, `tb->w64_inl` and `w64_lin_end` stay 0 and the accel hooks do nothing (inferred from the code; not tested). Then delete. CF_PCREL off exists only for inlining (unwind offsets). The 4 KB page can stay on its own. R6 depends on `w64_back_edge` | — | wasm |
|
||||
| A1 | `tb-jmp-cache.h` (`TB_JMP_CACHE_BITS 16`, `gen`, `tb_jmp_cache_key`), `tb-hash.h` (`tb_jmp_hash(pc, flags)`, the wasm64 hash; natively it calls upstream's untouched `tb_jmp_cache_hash_func(pc)`), `translate-all.c` `tcg_flush_jmp_cache`, `cpu-exec.c` `tb_lookup` / `cpu_exec_loop` | Jump cache: 64K entries, one entry per halfword of a page with 2 TB-flag bits in the hash, and a full flush done as a generation bump | 16 bits: J2ME −5.6 % (3fb2c66465). Halfword hash: stopwatch qht lookups 60k → 6k per 2 s (5c8cf5bc65). Generation flush: neutral on S75, saves 1–10 % of CX70 idle with the 64K table (741597d60a) | Delete the wasm64 branches and the native `tb_jmp_hash` wrapper, and rename its three calls (`cpu-exec.c` twice, `tb-maint.c`) back to `tb_jmp_cache_hash_func` | — | wasm |
|
||||
| A2 | `cpu-exec.c` `HELPER(lookup_tb_ptr_lc)`, the pc-cache probe in `HELPER(lookup_tb_ptr)`, `w64_lookup_tb_ptr_miss` (serves both helpers), `w64_may_cache`, `w64_lc_fill`, `w64_pcc[]`, `w64_pcc_hash`, `w64_pcc_get`, `w64_pcc_put`, `w64_pcc_shape`, `HELPER(tb_key_gen_bump)`; `translate-all.c` `cpu_tb_key_gen_bump`, `w64_lc` init; generation bumps in `tb-maint.c`, `hflags.c` `arm_set_hflags`, `vfp_fpscr.c`, `translate-vfp.c`, `gdbstub.c`, and one line each in `memory-timing.c` `tcg_memory_timing_select` (a class change) and `cpu-common.c` `cpu_breakpoint_insert`; `hflags.c` `arm_w64_lc_key`, `arm_w64_lc_key_pc`, `arm_w64_lc_key_layout`; `translation-block.h` `w64_lc`, `W64PccEnt`, `W64PccShape`; `translate-w64.c.inc` `w64_goto_ptr` (behind a hook in `translate.c` `gen_goto_ptr`), `w64_key_static`, `w64_abs_base`; the backend's `w64_pcc_call` (`tcg-target.c.inc`), `w64_pcc_probe` and its `pb_*` emitters and patching (`wasm64.c`), `w64_hint.pcc_call` (`wasm64.h`) | Inline next-TB cache on every goto_ptr: a per-TB slot, then a global pc-keyed table that the lookup helpers probe and that every batch module probes in a function of its own, which the exits call in the helper's place (TurboFan inlines it). A generation counter retires both caches when TB-key inputs change. Neither cache is filled for a `CF_MEMORY_TIMING` TB or while breakpoints exist | Per-TB slot: stopwatch +7..9 % (62bdab8192). pcc table: +6.8 % (c7a12330d9). The probe as a function of each batch module (`36e3b3cc4c`): EL71 boot burst −6.5 % (se 0.7) against an inline probe at every exit (`d4380167b9`), free-run within ±1 % on every scene. With the probe only in the helpers, video loses 3–5 % (performance.md, Closed ideas). `w64_abs_base`: towerblox +2.4 % / +2.0 % with bounds checks (2e70b8bed0, 305999f747) | Drop the hook in `gen_goto_ptr` (upstream's `tcg_gen_lookup_and_goto_ptr` follows it) and `w64_goto_ptr`. Drop the two helpers, the pcc table, the module's probe function and its call sites, the generation and all its bumps (also the two lines in `tcg_memory_timing_select` and `cpu_breakpoint_insert`), and `HELPER(lookup_tb_ptr)`'s probe and `w64_lookup_tb_ptr_miss` (with its `return tb->tc.ptr` in the log branch) | — | wasm |
|
||||
| A3 | `target/arm/tcg/translate-w64.c.inc` (included by `translate.c` before `gen_jmp_tb`): `w64_back_edge`, `w64_defer_taken`, `w64_absorb`, `w64_abs_cross_page`, `w64_try_join`, `w64_inline_call`/`_return`, `w64_inl_*`, `w64_refund`, `w64_charge_cycles`, `w64_emit_deferred_taken`, `w64_emit_inline_misses`; their hooks in `translate.c` (call sites in `gen_jmp_tb`, `trans_BX`, `trans_BL` and the insn loop) are unchanged; `translate.h` w64 fields; `translator.c` `w64_page1`, `w64_lin_end`, page-1 `translator_ld` and `translator_use_goto_tb`; `cpu-exec.c` `tb_lookup_cmp` `W64_INL_VPAGE1` probe, `tb_add_jump`'s inlined-TB list locking through `tb_w64_inl_link_begin` / `_add` / `_end` (`tb-maint.c`; stubs natively), the `last_tb` keep; `tb-maint.c` `tb_page_span`, `w64_inl_cross_stream`, `tb_unlink_inlined`; `translate-all.c` `w64_inl_pending`, `w64_tb_insn_index`; `target/arm/cpu.c` CF_PCREL off and `pagebits ≥ 12`; `board.c` `minimum_page_bits = 12` | Superblocks (loops branch back inside the TB, short forward branches absorbed, join points) and inlining of BL/BX callees into the caller's TB, on 4 KB guest pages. Every entry point refuses a `CF_MEMORY_TIMING` TB; the back-edge also refuses an instruction-set switch and M-profile | Superblocks: stopwatch vratio 0.58 → 0.87, video −8 %, music −5 %, Bobby −4 % CPU (2ff4e374c3). Back-edge +7.65 %, join +6 %. Inlining + 4 KB pages: 18–19 % faster than inlining off; 4 KB beats 1 KB by ~8 % (September). Chaining to page 1: video +2.6 % (e149f370ff). Inlined-TB unlink list: up to 40 % of the vCPU in EL71 boot (99166ef386) | The entry points are the six functions called from `gen_jmp_tb`, `trans_BX`, `trans_BL` and the insn loop. With all six refusing, `tb->w64_inl` and `w64_lin_end` stay 0 and the accel hooks do nothing (inferred from the code; not tested). Then delete. CF_PCREL off exists only for inlining (unwind offsets). The 4 KB page can stay on its own. R6 depends on `w64_back_edge` | — | wasm |
|
||||
| A4 | `tb-maint.c` `PageDesc.code_mask`, `tb_gmask_*`, `tb_page_granules`, `tb_page_covers`, `tb_store_misses_code` (declared in `tb-internal.h`) | Per-page bitmap of the 4-byte code granules, so that a store to a code page's data skips the TB-list walk | CX70 titles +2..15 % (2b8c359001). 4-byte granules: J2ME −6..−10 %, video −1.2 % (cb4dbe103f) | Delete the bitmap and `tb_page_covers`. C3's `do_ram_notdirty_1p` uses it and goes too | — | wasm |
|
||||
| A5 | `translate-all.c` `wasm_add_io_barrier` / `wasm_is_io_barrier` (declared in `internal-common.h`) and the `cpu_io_recompile` hunk; the two `__EMSCRIPTEN__` blocks in the `translator.c` loop | A PC that needed an io_recompile becomes a single-instruction TB, so the next MMIO access there does not rewind again | Each rewind is an exception unwind, and a polling loop would pay it on every pass. Under icount, a 60M-instruction S75 lockstep leg takes 16 s without the barriers and 3 s with them (2026-11-10); no free-run A/B. It is speed only: the lockstep divergence once blamed on the rewind was the instruction count not being handed back on an unwind (`4fc6ac6dc7`), and with that fixed the `LS_QARGS` run is clean without A5 to 400M instructions on S75 and EL71 | Delete the blocks; `cpu_io_recompile` rewinds every time, as upstream does | Lockstep with `LS_QARGS` (see Removing one) | wasm |
|
||||
| A6 | `translate-all.c` `setjmp_gen_code` (`w64_tb_env`), `translation-block.h`; `dsp/tcg.c` `tcg_prepare_block`; consumed by `tcg/wasm64` | With a single CPU, a TB addresses env fields as constants | towerblox +12.4 %, stopwatch +8 % with bounds checks (4dc162bbf6) | Never set `w64_tb_env` (leave it 0). The backend then falls back to env-relative addressing | — | wasm |
|
||||
| A7 | `system/cpus.c` `bql_lock_mmio`, `bql_unlock_mmio`, `bql_release_lazy`, `bql_wanted_by_other`, and the adopt/wanted changes in `bql_lock_impl`; `include/qemu/main-loop.h`; callers in `cputlb.c` (MMIO paths), `helper.c`, `op_helper.c`, and the `cpu_exec_loop` check | Lean BQL pair for MMIO. The release is deferred while no other thread wants the lock | BQL 4.6 → 2.4 % of the S75 idle vCPU (3cc26447e4). Deferred release: S75 idle +4.0 %, KE800 boot −10 % (fa15ac991b). Both measured under icount/rr in September, not re-measured under vcpu-timers + mttcg | Return the callers to `bql_lock()` / `bql_unlock()` and drop the four functions and the `bql_lock_impl` changes | — | all |
|
||||
| A7 | `system/cpus.c` `bql_lock_mmio`, `bql_unlock_mmio`, `bql_release_lazy`, `bql_wanted_by_other`, and the adopt/wanted changes in `bql_lock_impl`; `include/qemu/main-loop.h`; callers in `cputlb.c` (MMIO paths), `helper.c`, `op_helper.c`, and the `cpu_exec_loop` check | Lean BQL pair for MMIO. The release is deferred while no other thread wants the lock, and only under icount or vcpu-timers, whose slice or budget bounds the hold (QBUG-3: in plain mode it always unlocks) | BQL 4.6 → 2.4 % of the S75 idle vCPU (3cc26447e4). Deferred release: S75 idle +4.0 %, KE800 boot −10 % (fa15ac991b); both measured under icount/rr in September. The deferral off (`bql_unlock_mmio` always unlocking), free-run, 4 pairs each (2026-11-21): towerblox −3.1 % (se 0.8), video MIPS −4.9 % (se 0.7), bobby +0.2 % (se 2.2) | Return the callers to `bql_lock()` / `bql_unlock()` and drop the four functions and the `bql_lock_impl` changes | — | all |
|
||||
| A8 | `configure`, the wasm64 `CPU_CFLAGS` (`-sSUPPORT_LONGJMP=wasm`, and `-sWASM_LEGACY_EXCEPTIONS=0 -mllvm -wasm-use-legacy-eh=0` for the standard exnref instructions); the guards in `scripts/ninja-fast.sh` and `scripts/build-qemu-wasm64.sh` | setjmp/longjmp as wasm exception handling instead of emscripten's JS mode, which routes every call a setjmp caller makes through a JS `invoke_*` trampoline (`cpu_exec` once per entry, `setjmp_gen_code` three times per translated TB). 15 trampolines → 0. It composes with ASYNCIFY only while no function on `configs/meson/asyncify-only.txt` calls setjmp (lessons.md, Emscripten runtime) | EL71 boot burst −4.4 / −7.6 % (bootab.sh, 2 × 4 pairs, against `36e3b3cc4c`). Free-run, 4 pairs each: towerblox +4.9 %, video +3.6 %, bobby +1.2 %, midi +1.2 %, stopwatch −0.4 % (se 1.8) and +1.1 to +3.2 % swapped | Drop the flags from `CPU_CFLAGS` (upstream's line is `-m64 -sMEMORY64=…`) and the two guards, then rebuild from a fresh build dir (configure fixes the compiler's argv when the dir is made) | Firefox boot (`close` tier) | wasm |
|
||||
| A9 | `tcg/la-touched.c.inc`; its hooks in `tcg.c`: the `#include` after `la_cross_call`, six `if (LA_W64)` branches and three `la_w64_touch` calls in `liveness_pass_1`, the `LA_W64_RA` branches in `tcg_reg_alloc_bb_end` and `tcg_reg_alloc_cbranch` | Liveness walks only the globals, the TEMP_TB temps and the EBB/const temps an op read since the last reset, instead of every temp, at each block end, conditional branch and call-clobbering op. The register allocator saves only the TEMP_TB temps at a block end and skips the conditional branch's assert loop (non-debug builds). States, preferences and the generated code are as before | EL71 boot, 74k TBs: `liveness_pass_1` 543 → 377 ms (−30 %), register allocation and emission −14 %, `tcg_gen_code` 2.63 → 2.30 s (−12.5 %). Boot (bootab.sh, 2 × 4 pairs, against `42bb89c091`): burst −1.5 / −1.5 %, audioMs −2.1 / −2.8 %, lagMax −2.9 / −4.9 %. Free-run, 4 pairs each: stopwatch +5.9 % (4/4), towerblox −0.4 % and +2.8 % swapped (4/4), bobby +0.3 %, midi −0.1 %, video −0.3 % over 12 pairs (median −0.1 %) | Delete the file and its `#include`, keep the `else` arms of the `LA_W64` and `LA_W64_RA` branches, and drop the `la_w64_touch` calls | `#define LA_W64_CHECK` at the top of the file: every walk aborts if an EBB/const temp off the touched list is not dead with no preference (boot and the five scenes passed, 2026-11-06) | FILE |
|
||||
| A10 | `tcg/const-table.c.inc`; its hooks in `tcg.c`: the `#include` before `tcg_func_start`, the `W64_CONSTS` branches in `tcg_func_start` and `tcg_constant_internal` | A TB's constant temps go in a per-thread open-addressed table per type (2 × `TCG_MAX_TEMPS` slots), emptied by a generation bump, in place of the per-type `GHashTable` that `tcg_func_start` empties for every TB (two indirect calls per lookup, and a grow and shrink per TB). Same temps in the same order | EL71 boot (bootab.sh, 2 × 4 pairs, against `328087aa34`): burst −1.0 % (se 1.2) / −2.1 % (se 0.5, 4/4), audioMs −0.9 / −5.3 %, lagMax −2.8 / −4.5 %. Free-run: stopwatch +1.3 %, towerblox +1.1 % (4 pairs each), midi −0.1 % (8), bobby 0.0 % (12), video −0.2 % (16, median −0.2 %) | Delete the file and its `#include`, and keep the `else` arm in `tcg_func_start` and the code after the branch in `tcg_constant_internal` | `#define W64C_CHECK` at the top of the file: the `GHashTable`s are kept as well, and every lookup aborts unless both give the same temp (boot and the five scenes passed, 2026-11-06) | FILE |
|
||||
| A9 | `tcg/la-touched.c.inc`, with the `LA_W64` / `LA_W64_RA` selectors at its top; its hooks in `tcg.c`: one marked `#include` line after `la_cross_call`, six `if (LA_W64)` branches and three `la_w64_touch` calls in `liveness_pass_1`, the `LA_W64_RA` branches in `tcg_reg_alloc_bb_end` and `tcg_reg_alloc_cbranch` | Liveness walks only the globals, the TEMP_TB temps and the EBB/const temps an op read since the last reset, instead of every temp, at each block end, conditional branch and call-clobbering op. The register allocator saves only the TEMP_TB temps at a block end and skips the conditional branch's assert loop (non-debug builds). States, preferences and the generated code are as before | EL71 boot, 74k TBs: `liveness_pass_1` 543 → 377 ms (−30 %), register allocation and emission −14 %, `tcg_gen_code` 2.63 → 2.30 s (−12.5 %). Boot (bootab.sh, 2 × 4 pairs, against `42bb89c091`): burst −1.5 / −1.5 %, audioMs −2.1 / −2.8 %, lagMax −2.9 / −4.9 %. Free-run, 4 pairs each: stopwatch +5.9 % (4/4), towerblox −0.4 % and +2.8 % swapped (4/4), bobby +0.3 %, midi −0.1 %, video −0.3 % over 12 pairs (median −0.1 %) | Delete the file and its `#include`, keep the `else` arms of the `LA_W64` and `LA_W64_RA` branches, and drop the `la_w64_touch` calls | `#define LA_W64_CHECK` at the top of the file: every walk aborts if an EBB/const temp off the touched list is not dead with no preference (boot and the five scenes passed, 2026-11-06) | FILE |
|
||||
| A10 | `tcg/const-table.c.inc`, with the `W64_CONSTS` selector at its top; its hooks in `tcg.c`: one marked `#include` line before `tcg_func_start`, the `W64_CONSTS` branches in `tcg_func_start` and `tcg_constant_internal` | A TB's constant temps go in a per-thread open-addressed table per type (2 × `TCG_MAX_TEMPS` slots), emptied by a generation bump, in place of the per-type `GHashTable` that `tcg_func_start` empties for every TB (two indirect calls per lookup, and a grow and shrink per TB). Same temps in the same order | EL71 boot (bootab.sh, 2 × 4 pairs, against `328087aa34`): burst −1.0 % (se 1.2) / −2.1 % (se 0.5, 4/4), audioMs −0.9 / −5.3 %, lagMax −2.8 / −4.5 %. Free-run: stopwatch +1.3 %, towerblox +1.1 % (4 pairs each), midi −0.1 % (8), bobby 0.0 % (12), video −0.2 % (16, median −0.2 %) | Delete the file and its `#include`, and keep the `else` arm in `tcg_func_start` and the code after the branch in `tcg_constant_internal` | `#define W64C_CHECK` at the top of the file: the `GHashTable`s are kept as well, and every lookup aborts unless both give the same temp (boot and the five scenes passed, 2026-11-06) | FILE |
|
||||
| A11 | `include/qemu/w64-low.h` (`W64_LOW_*`, `w64_low_place`, `w64_low_release` in `tcg/wasm64/wasm64.c`); hooks: `hw/arm/pmb887x/board.c` (the CPU object), `dsp/runtime.c` `dsp_runtime_create` / `dsp_runtime_destroy`, `cpu-timers.h` + `ui/wasm.c` (`wasm_guest_insns`), `translation-block.h` (`w64_evict_epoch`), `hw/core/cpu.h` `CPUTLB.d` as a pointer with its allocation in `cputlb.c` `tlb_init` / `tlb_destroy`; the link flag `-sGLOBAL_BASE=262144` in `scripts/build-qemu-wasm64.sh` and its guard in `scripts/ninja-fast.sh` | The state A6 addresses as constants sits below 16 KiB of linear memory: the DSP runtime at 0x400, the CPU object at 0x2800 (env at ~13.5 KiB, which needs the 22 `CPUTLBDesc` out of the object's head), two counters at 0x100. V8's arm64 code takes such an address as the load's immediate offset; in the heap each access cost a `movz` + `movk` first, 19–22 % of all TB instructions. x64 folds any constant address, so nothing changes there | Phone (Snapdragon 750G, Chrome 156), towerblox: +12.8 % (x0.320, x0.334 against x0.289, x0.291), S75 boot −8 %; the CPU object and counter alone +8 %. Desktop x64: noise (0dcee227d0) | Delete `w64-low.h` and its users (grep `W64_LOW` and `w64_low_`), restore `CPUTLBDesc d[NB_MMU_MODES]`, drop the link flag and the ninja-fast guard. Each hook already falls back to the normal allocation, so dropping the link flag alone turns it off | An arm64 host: `SCENEBENCH_CDP` on a phone (performance.md, "On a phone"); the constant census of a grabbed module under an arm64 Node (lessons.md) | FILE |
|
||||
|
||||
## 2. cputlb, memory, physmem
|
||||
|
||||
| ID | Where | What it does | Benefit | Remove | Check | Mark |
|
||||
|---|---|---|---|---|---|---|
|
||||
| C1 | `cputlb.c` `tlb_resolve_io_dispatch`, `tlb_resolve_io_subpage`, `CPUTLBEntryFull` `io_*` fields, `io_read_fn`/`io_write_fn` calls in `int_ld/st_mmio_*`; `physmem.c` / `memory.h` `memory_region_subpage_leaf` | Resolves MMIO dispatch, including subpage leaves, at TLB fill time. An access is then one mask test plus an indirect call | EL71 +10 %, S75 MIPS +22 %, S75 J2ME stopwatch +9..35 % (fc11bb2acb, 274a0e4c24) | Return accesses to `memory_region_dispatch_read/write` and drop `subpage_leaf`. C2 depends on C1 | — | all |
|
||||
| C1 | `cputlb.c` `tlb_resolve_io_dispatch`, `tlb_resolve_io_subpage`, `CPUTLBEntryFull` `io_*` fields, `io_read_fn`/`io_write_fn` calls in `int_ld/st_mmio_*`; `physmem.c` / `memory.h` `memory_region_subpage_leaf` | Resolves MMIO dispatch, including subpage leaves, at TLB fill time. An access is then one mask test plus an indirect call | EL71 +10 %, S75 MIPS +22 %, S75 J2ME stopwatch +9..35 % (fc11bb2acb, 274a0e4c24). Kept whole on 2026-11-21 (QDEV-12 was tried and reverted). Census that day: the per-piece loops' fast arms take 3.2–3.7 % of MMIO accesses on the S75 scenes (~2.4k a guest second), 0.1–0.3 % on SL65 and EL71, the slow arms none; yet returning the loops to upstream's form cost video 1.7 % MIPS (4 rounds, both orders). The loops' shape matters to the hot helpers they are inlined with, not their own rate | Return accesses to `memory_region_dispatch_read/write` and drop `subpage_leaf`. C2 depends on C1 | — | all |
|
||||
| C2 | `cputlb.c` `do_ld_mmio_1p`, `do_st_mmio_1p`, `io_fast_bswap`, `tlb_io_in_range`, and their call blocks at the top of `do_ld{1,2,4,8}_mmu` / `do_st{1,2,4,8}_mmu` | Fused single-piece MMIO load and store paths that skip `mmu_lookup` | Loads: EL71 MIPS +6.9 %, fps +41 % (24d4eb318d). Stores: cover 98.8 % of S75 stores, no separate clock number (0a24e4e53a) | Delete the call blocks and the functions. The fused load charges `memory_region_get_read_cycles()` under `CF_MEMORY_TIMING` itself, as `int_ld_mmio_beN` does (`a535019428`) | — | all |
|
||||
| C3 | `cputlb.c` `do_ram_notdirty_1p` (the `#ifdef CONFIG_TCG_WASM64` block before the helpers) and the 4 `#ifdef` call blocks in `do_st{1,2,4,8}_mmu` | Stores to the data of a code page skip NOTDIRTY when A4 says the store misses code | J2ME game 5 −8.9 % (7538f05950). | Delete the block and the call blocks. Removing A4 forces it out too | — | wasm |
|
||||
| C5 | `cputlb.c` `tlb_set_page_full` growth, `tlb_mmu_resize_locked` hunk; `tlb-bounds.h` `TLB_FILL_GROW_MAX_BITS` | Grows a TLB at fill time. Upstream resizes only at flush, and full flushes run at ~0/s here | Not measured (6aa4c4f0cd). Without it the tables stay at 256 entries; they reach 8192 / 2048–4096 / 64 here | Delete the hunks. Run an A/B before removing | — | all |
|
||||
| C6 | `cputlb.c` `tlb_flush_phys_ranges`, `tlb_phys_note` / `_bit` / `_blk_bit` (16 MB buckets); `physmem.c` `tcg_region_changed`; `memory.c` `romd_stash_*`, `flatviews_update_romd`, `romd_off_mrs` / `ro_on_mrs`, `topo_gen`, `memory_topology_commit_full`, `memory_topology_views_recycled` | ROMD and readonly flips reuse cached FlatView variants, and the TLB is flushed only over the changed physical ranges | Topology commit 3857 → 421 ms per boot (529a995448). Readonly flip as a variant: fixed-work boot EL71 +55.6 %, CX70 +31.5 %, S75 +15.1 % (9970030816). Phys summary: ~4 % of the vCPU in KE970 boot (4b54517d3a, 95055ff451). Boot phase only | Return `memory.c` to full topology rebuilds and `physmem.c` to a full flush per commit. The correctness companions go with it: jump-cache flush on commit and the full commit on eventfd add/del (a0d035f4f0) | — | all |
|
||||
| C3 | `cputlb.c` `do_ram_notdirty_1p` (stores and returns bool; a native stub returns false) and its 4 call sites in `do_st{1,2,4,8}_mmu`, one unconditional line each | Stores to the data of a code page skip NOTDIRTY when A4 says the store misses code | J2ME game 5 −8.9 % (7538f05950). | Delete the function, its stub and the four call lines. Removing A4 forces it out too | — | wasm |
|
||||
| C5 | `cputlb.c` `tlb_set_page_full` growth, `tlb_mmu_resize_locked` hunk; `tlb-bounds.h` `TLB_FILL_GROW_MAX_BITS` | Grows a TLB at fill time. Upstream resizes only at flush, and full flushes run at ~0/s here. The grow keeps the large-page record (QBUG-2) | Without the grow, free-run, 4 pairs each (2026-11-21): towerblox −15.4 % (se 1.0), bobby −9.5 % (se 1.6). Without it the tables stay at 256 entries; they reach 8192 / 2048–4096 / 64 here (6aa4c4f0cd) | Delete the hunks | — | all |
|
||||
| C6 | `cputlb.c` `tlb_flush_phys_ranges`, `tlb_phys_note` / `_bit` / `_blk_bit` (16 MB buckets); `physmem.c` `tcg_region_changed`; `memory.c` `romd_stash_*`, `romd_sig2`, `flatviews_update_romd`, `romd_off_mrs` / `ro_on_mrs`, `topo_gen`, `memory_topology_commit_full`, `memory_topology_views_recycled` | ROMD and readonly flips reuse cached FlatView variants, and the TLB is flushed only over the changed physical ranges. The stash signature carries a second hash (`romd_sig2`), and a view with `topo_gen` 0 is not stashed (QBUG-14) | Topology commit 3857 → 421 ms per boot (529a995448). Readonly flip as a variant: fixed-work boot EL71 +55.6 %, CX70 +31.5 %, S75 +15.1 % (9970030816). Phys summary: ~4 % of the vCPU in KE970 boot (4b54517d3a, 95055ff451). Boot phase only. Kept on 2026-11-21 (QDEV-16 was tried and reverted): upstream's in-place FlatView update (f167b6088d) would cover every flip (census that day: all 1,302 S75 / 846 EL71 romd/readonly variant changes kept the layout), but without the stash the S75 boot's audio (stretched + silent) was worse in six boot A/Bs of six (+3.2 to +18.6 %, 4 pairs each, bootab.sh) at a level burst: the per-flip render stalls the vCPU | Return `memory.c` to full topology rebuilds and `physmem.c` to a full flush per commit. The correctness companions go with it: jump-cache flush on commit and the full commit on eventfd add/del (a0d035f4f0) | — | all |
|
||||
| C7 | `cputlb.c` `tlb_watch_ram_dirty`, `tlb_reset_dirty_logged`, `tlb_ram_watch_note`, `tlb_set_ram_write_guard` + `ram_write_guard_hits` / `_trap` in `notdirty_write`; `include/exec/cputlb.h` | Targeted dirty resets inside a watched RAM range, plus a write-guard callback on stores to guarded RAM | `tlb_reset_dirty_range_all` 494 → 13 ms per 20 s, from 2.4 % of the vCPU (9692169830). The guard is what makes D1 correct (0c3c3c8c9b). | Only together with D1. Its only user is `dif_v2.c` | — | all |
|
||||
| C8 | `include/exec/tlb-common.h` `CPUTLBEntry` (`addend_read`, `addend_write`, 32-bit `addr_read` / `addr_write`); `cputlb.c` `tlb_read_idx`, `tlb_set_compare`; the backend's `w64_tlb_probe`, `w64_tlb_haddr` and `W64_L_TLBW` (`tcg-target.c.inc`) | A TLB entry's read and write comparators each sit next to a copy of the addend's low half, and the generated probe takes the pair in one 64-bit load: two bounds-checked loads per guest access on Android where there were three | Free-run with bounds checks against `db5ec3b899`: stopwatch +2.4 % (6 pairs, −0.4 to +4.9), towerblox +1.1 % (14 pairs, se 1.0) (`33855e074b`) | Restore the two `uintptr_t` fields and the `addr_idx[]` accesses, and load the comparator at `cmp_ofs` and the addend at 24 in the probe. R8 reads the pair too | Lockstep with `LS_QARGS` (every guest access goes through it) | wasm |
|
||||
|
||||
|
|
@ -152,51 +168,53 @@ before relying on it.
|
|||
| ID | Where | What it does | Benefit | Remove | Check | Mark |
|
||||
|---|---|---|---|---|---|---|
|
||||
| R1 | `translate.c` `arm_excp_exit_ok` + DISAS_SWI in `arm_tr_tb_stop`; `op_helper.c` `HELPER(svc_inline)`; `helper-defs.h`; `helper.c` / `internals.h` `arm_take_svc_aarch32` | Takes an SVC inside the TB (cores without EL2/EL3), with no cpu_loop_exit unwind | Without it the boot window is −26 %; video +16.2 % (f5df8cb003). Dispatcher iterations 2387 → 28 /Mi | Return DISAS_SWI to `gen_exception` and drop the helper and `arm_take_svc_aarch32` | — | wasm |
|
||||
| R2 | `op_helper.c` `HELPER(cpsr_write_eret)`; `translate.c` `gen_eret_end_tb` (wasm branch) | An exception return skips the BQL pairs around empty hook lists and continues through goto_ptr. The second `arm_rebuild_hflags` is dropped | Hook skip: video −5.7 % ± 1.5; `bql_lock` 1.29M/s → 6k/s (46d7aa3e64). Rebuild drop: ~0.7 % of the vCPU, below wall-clock resolution (addf630b8e) | Restore the upstream lock/unlock and drop the `#ifndef` around the `arm_rebuild_hflags(env)` line. Keep `cpsr_write_check_irq`, which R3 needs | — | wasm |
|
||||
| R3 | `translate.c` `w64_psr_can_continue`, `w64_psr_continue`, `w64_psr_new_miss`, `w64_gen_irq_pending_br`, `w64_emit_psr_misses`, `w64_cpsr_write_inline`, `w64_gen_cpsr_read`, the wasm tail of `gen_set_psr` and the `#ifndef` around `gen_lookup_tb_after_cpsr_write`; `op_helper.c` `cpsr_write_check_irq` | `msr` / `mrs cpsr` inline, and CPSR/SPSR writes that do not end the TB | `msr` continuation + SPSR no-end: video +1.8 % (4d1a392927). Inline CPSR write: video −2.16 % ± 0.85 ms/Mi (e2976ebbfe). Inline `mrs`: −2.47 % ± 0.92 (4e60f930b2). Returning all of R3 to upstream on 2026-11-04: stopwatch −3.7 % ± 1.2, towerblox −1.0 % | Return `gen_set_psr`, `gen_rfe` and the `mrs` path to upstream | — | wasm |
|
||||
| R4 | `translate.c` `gen_shift_cc_w64` and its `#ifdef` in `gen_arm_shift_reg` | Inline flag-setting register shifts | Video −1.09 % ± 0.52, J2ME −0.72 % ± 1.20 (c4919f185b). Without it on 2026-11-04, `helper_shr_cc` was the only stopwatch profile difference from the pre-cleanup build, and the cleanup candidate lost stopwatch −1.07 % over 8 pairs (8 negative) | Delete both `#ifdef` blocks | — | wasm |
|
||||
| R5 | `hflags.c` `rebuild_hflags_a32_fast`, `rebuild_hflags_a32_el`, and the A32 shortcut in `rebuild_hflags_internal` | Short hflags rebuild for pre-v6 A-profile at EL0/EL1 | S75 idle +3.9 %, 4/4 pairs (90e45a1cec). Removing it on 2026-11-04: towerblox −2.6 % ± 0.9, bobby −1.6 % ± 0.7 | Return `rebuild_hflags_internal` to its upstream body and delete the two functions | — | all |
|
||||
| R6 | `target/arm/tcg/w64-fill.c`/`.h`, `HELPER(w64_fill)` in `helper-defs.h`, the line in `target/arm/tcg/meson.build`; `translate.h` `w64_fill_words`, `w64_fill_desc`, `w64_rect_ft`, `w64_rect`; `translate.c` `w64_fill_match` (called from `w64_back_edge`), `w64_rect_match` and `w64_bcond_dest` (called from `arm_tr_tb_stop`), the recording in `thumb_tr_translate_insn` and `w64_emit_deferred_taken`, the copy into `tb->w64_rect` at the end of `arm_tr_tb_stop` and the init in `arm_tr_init_disas_context`; `include/exec/translation-block.h` `w64_rect` and `w64_interp_running` (in `tcg/wasm64/w64-interp.c`) | Runs more passes of the 6-instruction Thumb J2ME fill loop in C at the back-edge, charging icount, cycles and counters exactly as the generated code would. When the loop's TB goes on into the row tail and chains to a row-head TB that chains back (a fill rectangle), the same call also runs the following rows, up to 4096 passes, with the state in locals and one write-back | towerblox ~+1.5 % (7/10 pairs); stopwatch and bobby neutral (3116fa62be). Removing it on 2026-11-04: towerblox −1.4 % over 12 pairs (9 negative). Storing the colour 8 bytes at a time (2026-11-04) cut the helper's self time per guest second by ~15 % in paired profiles, ~0.2 % of towerblox. Rectangles (2026-11-05): towerblox +1.9 % over 16 pairs (se 0.7, 12 positive), the fill's share of V8 ticks 3.57 → ~2.0 %; the final source again +1.7 % over 8 pairs. Midi −0.25 % (8 pairs). Stopwatch −1.0 % over 16 pairs at sd ~3 % per pair, while it makes under 2^20 fill calls in 30 s. Bobby −1.4 % over four rounds (se 0.24) without reaching the fill: a control with the same function-index shift and no new code reproduced −0.8 % (performance.md, A/B pitfalls) | Delete the file pair, the meson line, the helper entry and the marked hooks | Lockstep is **blind** to it (framebuffer SDRAM is only soft-compared). Predict-and-compare checker (not in repo); for the 8-byte stores, a per-element reference copy with 8 bytes of margin matched over 23M towerblox calls, and a `pattern ^ 1` mutant aborted. Rectangles: two predictors, one row transition at a time and the fused loop over 1–4 rows with every store logged ([performance.md](performance.md), in-situ checkers); a `v ^ 1` store mutant and a one-cycle mutant were each caught at every prediction | FILE |
|
||||
| R7 | `target/arm/tcg/w64-fill.c`/`.h` (the second half), `HELPER(w64_blit)` in `helper-defs.h`; `translate.c` `w64_blit_match` (called from `w64_back_edge`) and the join recording in `w64_try_join`; `translate.h` `w64_join`, `w64_join_n`, and `w64_fill_words` grown to 17 | Runs more passes of the firmware's 17-instruction colour-keyed blit loop (S75 `a0a05540`, EL71 `a0a16890`) in C at the back-edge, a page of source and destination at a time in guest order, charging each pass by its pixel class exactly as the generated code's branches and joins would | stopwatch +7.0 % over 7 pairs, all positive; towerblox +1.0 % over 6 (se 1.8), two pairs at a time against the same build with the matcher call disabled (`dcb799b05c`) | Delete the second half of the file, the helper entry and the marked hooks | Lockstep sees its registers and counts but not the pixels. Predict-and-compare against the generated code (checker not in repo): 1.07M rows on stopwatch, 3.2M on towerblox, no mismatch. `tests/tcg-isa/t_blit.c` carries the loop against a C model and the gate byte-compares it with native; two kernel mutants failed it | FILE |
|
||||
| R8 | `translate.c` `w64_block_host`, `w64_block_fast`, `w64_stm_fast`, `w64_ldm_fast` and their hooks in `op_stm` / `do_ldm`; `include/tcg/tcg.h` `TCGLabel.cold`; the two `l->cold` hints in the backend's `w64_br_to_label` | One TLB probe for all the words of an LDM/STM of two or more registers, in TCG ops, keyed on the last word (the per-access probe's page-straddling trick); the words then go through the host pointer. A miss, MMIO, a clean or guarded page, a page boundary inside the block or a misaligned base take the per-word code, which is unchanged and hinted cold. The loaded pc and base are stored after the arms meet. User-bank and exception-return forms keep the per-word code only | Census, towerblox: 27 % of executed probes were the later words of a push or pop (531M of 1965M); the fast arm ran 98.7 % of the time. Free-run with bounds checks against C8 alone: towerblox +2.0 % (6 pairs), stopwatch +3.6 % (4 pairs, −2.6 to +7.6). C8 and R8 against `db5ec3b899`: towerblox +3.1 % (16 pairs), stopwatch +4.1 % (6), bobby +1.5 %, midi +1.2 %, video mips +0.5 % (4 each) (`8fcac1b334`) | Delete the four functions and the marked hooks; `TCGLabel.cold` and its two hints go with them | Lockstep with `LS_QARGS`. `tests/tcg-isa/t_block.c`: eight words at every split across a page boundary and the base in the list, repeated into compiled code | wasm (`TCGLabel.cold`: all) |
|
||||
| R2 | `op_helper.c` `HELPER(cpsr_write_eret)`; `translate-w64.c.inc` `w64_eret_end_tb`, after upstream's two lines at each exception return in `translate.c` | An exception return skips the BQL pairs around empty hook lists and continues through goto_ptr. The second `arm_rebuild_hflags` is dropped | Hook skip: video −5.7 % ± 1.5; `bql_lock` 1.29M/s → 6k/s (46d7aa3e64). Rebuild drop: ~0.7 % of the vCPU, below wall-clock resolution (addf630b8e) | Restore the upstream lock/unlock and drop the `#ifndef` around the `arm_rebuild_hflags(env)` line, `w64_eret_end_tb` and its two hooks. Keep `cpsr_write_check_irq`, which R3 needs | — | wasm |
|
||||
| R3 | `translate-w64.c.inc` `w64_psr_can_continue`, `w64_psr_continue`, `w64_psr_new_miss`, `w64_gen_irq_pending_br`, `w64_emit_psr_misses`, `w64_cpsr_write_inline`, `w64_gen_cpsr_read`, `w64_gen_set_psr`; `translate.c` `gen_set_psr`'s hook, one early return into `w64_gen_set_psr()`; `op_helper.c` `cpsr_write_check_irq` | `msr` / `mrs cpsr` inline, and CPSR/SPSR writes that do not end the TB | `msr` continuation + SPSR no-end: video +1.8 % (4d1a392927). Inline CPSR write: video −2.16 % ± 0.85 ms/Mi (e2976ebbfe). Inline `mrs`: −2.47 % ± 0.92 (4e60f930b2). Returning all of R3 to upstream on 2026-11-04: stopwatch −3.7 % ± 1.2, towerblox −1.0 % | Delete the functions and their hooks in `translate.c` (`gen_set_psr`'s early return, the `mrs` path) | — | wasm |
|
||||
| R4 | `translate-w64.c.inc` `gen_shift_cc_w64`; its declaration and its `#ifdef` in `translate.c` `gen_arm_shift_reg` | Inline flag-setting register shifts | Video −1.09 % ± 0.52, J2ME −0.72 % ± 1.20 (c4919f185b). Without it on 2026-11-04, `helper_shr_cc` was the only stopwatch profile difference from the pre-cleanup build, and the cleanup candidate lost stopwatch −1.07 % over 8 pairs (8 negative) | Delete the function and both `#ifdef` blocks | — | wasm |
|
||||
| R5 | `hflags.c` `rebuild_hflags_a32_fast` and `w64_set_hflags_a32_fast`, both under `CONFIG_TCG_WASM64` only; one guarded early return into `w64_set_hflags_a32_fast` in each of `arm_rebuild_hflags`, `HELPER(rebuild_hflags_a32_newel)` and `HELPER(rebuild_hflags_a32)`, which are otherwise upstream's bodies, as is `rebuild_hflags_internal` | Short hflags rebuild for pre-v6 A-profile at EL0/EL1. Since 2026-11-21 on wasm64 only: native lockstep checks R5 instead of sharing it | S75 idle +3.9 %, 4/4 pairs (90e45a1cec). Removing it on 2026-11-04: towerblox −2.6 % ± 0.9, bobby −1.6 % ± 0.7 | Delete the fast function, `w64_set_hflags_a32_fast` and the three early returns | — | wasm |
|
||||
| R6 | `target/arm/tcg/w64-fill.c`/`.h`, `HELPER(w64_fill)` in `helper-defs.h`, the line in `target/arm/tcg/meson.build`; `translate.h` `w64_fill_words`, `w64_fill_desc`, `w64_rect_ft`, `w64_rect`; `translate-w64.c.inc` `w64_fill_match` (called from `w64_back_edge`), `w64_rect_match` and `w64_bcond_dest` (called from `arm_tr_tb_stop`), the recording in `w64_emit_deferred_taken`; `translate.c` the recording in `thumb_tr_translate_insn`, the copy into `tb->w64_rect` at the end of `arm_tr_tb_stop` and the init in `arm_tr_init_disas_context`; `include/exec/translation-block.h` `w64_rect` and `w64_interp_running` (in `tcg/wasm64/w64-interp.c`) | Runs more passes of the 6-instruction Thumb J2ME fill loop in C at the back-edge, charging icount, cycles and counters exactly as the generated code would. When the loop's TB goes on into the row tail and chains to a row-head TB that chains back (a fill rectangle), the same call also runs the following rows, up to 4096 passes, with the state in locals and one write-back | towerblox ~+1.5 % (7/10 pairs); stopwatch and bobby neutral (3116fa62be). Removing it on 2026-11-04: towerblox −1.4 % over 12 pairs (9 negative). Storing the colour 8 bytes at a time (2026-11-04) cut the helper's self time per guest second by ~15 % in paired profiles, ~0.2 % of towerblox. Rectangles (2026-11-05): towerblox +1.9 % over 16 pairs (se 0.7, 12 positive), the fill's share of V8 ticks 3.57 → ~2.0 %; the final source again +1.7 % over 8 pairs. Midi −0.25 % (8 pairs). Stopwatch −1.0 % over 16 pairs at sd ~3 % per pair, while it makes under 2^20 fill calls in 30 s. Bobby −1.4 % over four rounds (se 0.24) without reaching the fill: a control with the same function-index shift and no new code reproduced −0.8 % (performance.md, A/B pitfalls) | Delete the file pair, the meson line, the helper entry and the marked hooks | Lockstep is **blind** to it (framebuffer SDRAM is only soft-compared). Predict-and-compare checker (not in repo); for the 8-byte stores, a per-element reference copy with 8 bytes of margin matched over 23M towerblox calls, and a `pattern ^ 1` mutant aborted. Rectangles: two predictors, one row transition at a time and the fused loop over 1–4 rows with every store logged ([performance.md](performance.md), in-situ checkers); a `v ^ 1` store mutant and a one-cycle mutant were each caught at every prediction. **After a merge:** the taken Thumb `b<cond>` cost is `ARM9E_THUMB_BCOND_TAKEN_CYCLES` (`w64-fill.h`), which `trans_B_cond_thumb` uses too; if upstream changes its number there, the merge conflicts on that line | FILE |
|
||||
| R7 | `target/arm/tcg/w64-fill.c`/`.h` (the second half), `HELPER(w64_blit)` in `helper-defs.h`; `translate-w64.c.inc` `w64_blit_match` (called from `w64_back_edge`) and the join recording in `w64_try_join`; `translate.h` `w64_join`, `w64_join_n`, and `w64_fill_words` grown to 17 | Runs more passes of the firmware's 17-instruction colour-keyed blit loop (S75 `a0a05540`, EL71 `a0a16890`) in C at the back-edge, a page of source and destination at a time in guest order, charging each pass by its pixel class exactly as the generated code's branches and joins would | stopwatch +7.0 % over 7 pairs, all positive; towerblox +1.0 % over 6 (se 1.8), two pairs at a time against the same build with the matcher call disabled (`dcb799b05c`) | Delete the second half of the file, the helper entry and the marked hooks | Lockstep sees its registers and counts but not the pixels. Predict-and-compare against the generated code (checker not in repo): 1.07M rows on stopwatch, 3.2M on towerblox, no mismatch. `tests/tcg-isa/t_blit.c` carries the loop against a C model and the gate byte-compares it with native; two kernel mutants failed it. **After a merge:** as R6 | FILE |
|
||||
| R8 | `translate-w64-block.c.inc` `w64_block_host`, `w64_block_fast`, `w64_stm_fast`, `w64_ldm_fast` and their hooks in `translate.c` `op_stm` / `do_ldm`; `include/tcg/tcg.h` `TCGLabel.cold`; the two `l->cold` hints in the backend's `w64_br_to_label` | One TLB probe for all the words of an LDM/STM of two or more registers, in TCG ops, keyed on the last word (the per-access probe's page-straddling trick); the words then go through the host pointer. A miss, MMIO, a clean or guarded page, a page boundary inside the block or a misaligned base take the per-word code, which is unchanged and hinted cold. The loaded pc and base are stored after the arms meet. User-bank and exception-return forms keep the per-word code only | Census, towerblox: 27 % of executed probes were the later words of a push or pop (531M of 1965M); the fast arm ran 98.7 % of the time. Free-run with bounds checks against C8 alone: towerblox +2.0 % (6 pairs), stopwatch +3.6 % (4 pairs, −2.6 to +7.6). C8 and R8 against `db5ec3b899`: towerblox +3.1 % (16 pairs), stopwatch +4.1 % (6), bobby +1.5 %, midi +1.2 %, video mips +0.5 % (4 each) (`8fcac1b334`) | Delete the four functions and the marked hooks; `TCGLabel.cold` and its two hints go with them | Lockstep with `LS_QARGS`. `tests/tcg-isa/t_block.c`: eight words at every split across a page boundary and the base in the list, repeated into compiled code | wasm (`TCGLabel.cold`: all) |
|
||||
|
||||
## 4. pmb887x devices
|
||||
|
||||
All of these are plain C in upstream device files, with no `#ifdef`
|
||||
(**all**), and unmarked except where the row says "marked". The DIF v2 lazy
|
||||
(**all**), and unmarked except where the row says "marked" or Marking lists
|
||||
the hooks. The DIF v2 lazy
|
||||
and fed paths run only under vcpu-timers (runtime check
|
||||
`qemu_virtual_timers_on_vcpu`). `dif_v2.c` is about 620 lines from upstream.
|
||||
|
||||
| ID | Where | What it does | Benefit | Remove | Check |
|
||||
|---|---|---|---|---|---|
|
||||
| D1 | `dif_v2.c` `dif_tx_bus_go_lazy`, `_lazy_wake`, `_catch_up`, `_leave_lazy`, `_write_trap`, `_dmac_catch_up`, `dif_get_guarded_tx_source`; uses T5, C7 and `pmb887x_dmac_set_catch_up` | Display-bus wakes go lazy while the vCPU runs. A guard and catch-up run them before anything can observe the bus | Stopwatch vratio under contention 0.466 → 0.569 and 0.567 → 0.686 (0c3c3c8c9b) | Delete these and the lazy branch of the wake path, together with T5's only user and C7's guard | Wake and store differential checkers (not in repo) |
|
||||
| D1 | `dif_v2.c` `dif_tx_bus_go_lazy`, `_lazy_wake`, `_catch_up`, `_leave_lazy`, `dif_tx_bus_leave_lazy_cb()` (the write trap, the DMAC catch-up and `dif_clock_changed` in one), `dif_get_guarded_tx_source`; uses T5, C7 and `pmb887x_dmac_set_catch_up` | Display-bus wakes go lazy while the vCPU runs. A guard and catch-up run them before anything can observe the bus | Stopwatch vratio under contention 0.466 → 0.569 and 0.567 → 0.686 (0c3c3c8c9b) | Delete these and the lazy branch of the wake path, together with T5's only user and C7's guard | Wake and store differential checkers (not in repo) |
|
||||
| D2 | `dif_v2.c` `dif_run_fed_tx_bus`, `dif_plan_fed_tx_bus`, `dif_count_fed_tx_wakes`, `dif_get_fed_tx_bus_words`, `dif_skip_fed_tx_wakes`, `is_mux_shifts` / `mux_*shift*` in `dif_update_mux` + `dif_mux_entries`; `dmac.c` `pmb887x_dmac_count_bulk_bursts`, `_get_bulk_source`, `_serve_bulk_bursts` | Runs the bus wakes of a halted CPU in one callback, with a planned batch, a closed-form plan and a shift-based mux | Bobby 0.860 → 0.762, −11 % (62b16312dd). Batch cap 512: +1.3/+4.2/+1.6/+1.7 % (0d749b0fd6). Word hoist: 2.1 → 1.5 % of busy ticks (3867c78042). Closed-form plan: 1.02 → 0.25 % (78b8a15418). Shift mux: 1.59 → 1.01 % (b51a7c5b18). The last two are profile shares only | Delete the fed branch. It needs D3 and `vcpu-timers-idle-lead` > 0 (`cpu_clock_owner_idle_reaches`) | Differential checks (`dif_v2.c.chk*`, not in repo) |
|
||||
| D3 | `dif_v2.c` `dif_serve_tx_burst`, `dif_raise_tx_burst_request`, coalesced `dif_clear_dma_requests`; `dmac.c` `pmb887x_dmac_serve_burst`, `dmac_get_served_channel` | Serves a display TX burst without the DMA request handshake | Bobby 0.812 → 0.796 → 0.771 (a85157e75b). Load-bearing for D2 | Delete together with D2 | Native lockstep, base vs fast path |
|
||||
| D4 | `dif_v2.c` `dif_occupy_tx_bus(..., now_ps)` | Reads the clock once per TX FIFO pass | Stopwatch +1.7 % under parbench, biased (d5ac642584). Reverting D2's plan and shift mux + this clock cache + D10's baseband together cost stopwatch 3–7 % (2026-11-02). | Restore the per-entry clock reads | — |
|
||||
| D6 | `dmac.c` `dmac_translate`, `dmac_memory_commit` (MemoryListener), `dmac_read_bytes`; `hw/dma/dma-sink.c` `dma_sink_write_block_mr` (marked) | Caches the FIFO's bus translations and hands the sink the translated region. The sink lookup itself is upstream's `DMASinkCache` | Stopwatch +1.8 % (d7590ed13c). Bobby −1.7 % (e576fc3017) | Delete the translation cache and call upstream's `dma_sink_write_block` with the bus address; drop `dma_sink_write_block_mr` | — |
|
||||
| D6 | `dmac.c` `dmac_translate`, `dmac_memory_commit` (MemoryListener), `dmac_read_bytes`; `hw/dma/dma-sink.c` `dma_sink_write_block_mr` (marked) | Caches the FIFO's bus translations and hands the sink the translated region. The sink lookup itself is upstream's `DMASinkCache` | Stopwatch +1.8 % (d7590ed13c). Bobby −1.7 % (e576fc3017). Kept on 2026-11-21 (QDEV-26, not tried): census that day, `dmac_fifo_drain` reaches `dma_sink_write_block_mr` 111k times a guest second on video, 44k on midi, 3.7k on towerblox, 0.5k on bobby; upstream's form would translate the address on each | Delete the translation cache and call upstream's `dma_sink_write_block` with the bus address; drop `dma_sink_write_block_mr` | — |
|
||||
| D7 | `tpu.c` `tpu_update_timer` (re-arm only on a moved deadline), `tpu_advance` (single advance), `tpu_ram_write_moves_deadline` | Cuts TPU timer re-arms and advances per register or event-RAM write | Re-arm: S75 idle MIPS +11 %, EL71 +21 % (0662edf94c). Single advance: `tpu_advance` 5.8 → 2.9 % (5797540d62). Event-RAM early return: S75 +7..20 % (de7cdf5fd0). One-event window: not claimed (3b2d98faed) | Restore upstream `tpu.c` (the window then reverts to 0068's fork test, not to upstream) | — |
|
||||
| D8 | `gptu.c` `gptu_t01_observable`, `_matters`, `_free_running`, `_ticks_to_boundary`, `_advance`, `gptu_ev_wants_timer` | Arms the GPTU T0/T1 QEMU timer only for overflows the guest can observe | KE800 went from never reaching idle to booting; S75 boot −4..5 % (a2b52c7c77; the 474bff9dbe syncs are its correctness fixes) | Restore upstream `gptu.c` | — |
|
||||
| D9 | `hw/lcd/lcd.c` (GRAM drain in place, polling writer, `lcd_transfer_bytes`, `lcd_queue_ram_byte_run`; marked); `hw/gpu/s1d13716/s1d13716.c` `s1d13716_transfer_block` / `_bytes` and the plain cast in `s1d13716_transfer` (marked); `hw/ssi/ssi.c` `ssi_transfer_bytes` + `transfer_bytes` hook and the plain casts in `ssi_transfer` | Moves display bytes to the LCD in runs, with no per-byte transfer calls or condvar wakes. The per-byte paths that remain skip the checked QOM casts and their trace point | Drain in place: stopwatch vratio 0.892 → 0.943 (3a4052ddc7). Polling: futex wakes 2.13 → 0.29 % (43c24bb03d). Byte runs: ~1.3 % profile (2f09e9c30f). s1d13716 pass-through: +12 % J2ME window, September (ed6a5daa97). Plain casts: with the checked ones back on 2026-11-04, `object_dynamic_cast_assert` rose 0.33 → 0.41 % of midi and 0.04 → 0.09 % of stopwatch, and midi leaned −0.6 % over three rounds | Restore upstream `hw/lcd/lcd.c`, `include/hw/lcd/lcd.h`, `ssi.c` / `ssi.h` and `s1d13716.c`. D2 calls `ssi_transfer_bytes` | — |
|
||||
| D10 | `dsp/peripheral/baseband.c` `baseband_publish_range`; `hw/audio/i2s.c` class cache | Small per-call cuts: stepped ring indices, cached QOM class | Baseband: 3.09 → 2.49 % profile (ce4d3f684a). i2s: Bobby 0.919 → 0.909 (01c6acb0bb) | Restore upstream | — |
|
||||
| D10 | `dsp/peripheral/baseband.c` `baseband_publish_range`; `hw/audio/i2s.c` class cache | Small per-call cuts: stepped ring indices, cached QOM class | Baseband: 3.09 → 2.49 % profile (ce4d3f684a). i2s: Bobby 0.919 → 0.909 (01c6acb0bb). The i2s class cache kept on 2026-11-21 (QDEV-25): census that day, `i2s_tx_write` 16–21k calls a guest second on bobby, towerblox and midi (per audio frame), `i2s_rx_read` as many on bobby and towerblox; without the cache each runs an interface-class `object_class_dynamic_cast` (the D11 mechanism) | Restore upstream | — |
|
||||
| D11 | `hw/audio/audio-line.c` `audio_line_write`, `audio_line_sink_port_init`; `include/hw/audio/audio-line.h` `AudioLineSinkPort.klass` (marked) | Holds the sink's interface class in the port and walks the bus without checked casts, as upstream's `i2s_tx_write` does. The AFE and the PMIC router write one sample frame per call | Without it the 2026-11-09 merge lost towerblox −4.2 % and midi −1.4 % (4/4 pairs); the class lookup alone was ~0.3 % of towerblox and ~0.6 % of midi (3486f1e2b7) | Call `AUDIO_LINE_SINK_GET_CLASS` per write again and drop the field | — |
|
||||
| D12 | `dsp/peripheral.c` `dsp_bus_advance` (the walk is now `dsp_bus_advance_devices`), `dsp_bus_flush`, `dsp_bus_get_horizon`, `dsp_bus_device_takes_cycles`, the flushes in the clock, CODON and external-register entry points and the subtraction in `dsp_bus_get_cycles_until_event`; `peripheral/internal.h` `dsp_bus_access`, `dsp_device_t.timed`, `pending_cycles` / `horizon_cycles` / `horizon_max`; `peripheral/i2s.c` `dsp_i2s_get_cycles_until_frame`; `peripheral/timer2.c` `timer2_get_cycles_until_interrupt`; `tests/peripheral.c` `test_bus_horizon` (marked) | The bus adds cycles up while the sum is below the first cycle at which an active device does more than count (an I2S frame, timer 2 reaching its maximum) and hands the devices the sum then, or before an access to a device that takes cycles. Only the I2S ports and timer 2 have a horizon: any other active device, or a peripheral type the bus does not know, holds it at zero, which is upstream's behaviour. The baseband is asked on every call | bobby +2.2 % (6 pairs), towerblox +1.2 % (12), midi +0.6 % (6), stopwatch and video ±0; towerblox profile `dsp_bus_advance` 3.05 → 2.4 % with callees; 86 % of the calls return after the add (`58cb97caff`) | Revert `58cb97caff`. To switch it off for a comparison, return 0 from `dsp_bus_get_horizon` | `tools/perf/busdigest.py`: identical digests against the undeferred bus over 35M bus events of the S75 and EL71 boots; `test_bus_horizon` in the `pmb887x-dsp-peripheral` unit test. Both catch a horizon late by 50 cycles. **After a merge:** a device upstream adds to the walk holds the horizon at zero by itself (the count in `dsp_bus_create`), but if `dsp_i2s_advance` or `timer2_advance` come to do anything between frames, or before the counter reaches its maximum, the two horizon functions must follow: rerun the digest |
|
||||
|
||||
## 5. DSP translator (`hw/arm/pmb887x/dsp/tcg.c`)
|
||||
|
||||
All of these are inline in the upstream file, unmarked, and compiled natively
|
||||
(**all**). The exceptions are the wasm64 parts of P10 and A6.
|
||||
(**all**). The exceptions are the wasm64 parts of P10 and A6, and P1, which is
|
||||
in a file of its own with marked hooks.
|
||||
|
||||
| ID | Where | What it does | Benefit | Remove | Check |
|
||||
|---|---|---|---|---|---|
|
||||
| P1 | The kernel section from `tcg_fast_loop_35be[]` to `tcg_execute_fast()` (contiguous, after `tcg_execute_prepared_block`; ~1600 lines: `tcg_fast_run_35be` / `tcg_fast_iterate_35be` via `TEAK_FAST_LOOP` / `TEAK_FAST_RUNNER`, 643F/6489/64A9, `tcg_fast_discover`, `_relocate`, `_lookup`, `_invalidate`, `_verify`); hooks in `tcg_prepare_block`, the program-write paths, `HELPER(teak_tcg_chain)` and the slice runners; forward declarations near the top; `core.h` `fast_runs` | Hot GSM correlator loops run as C kernels instead of chained TCG blocks | All loops on vs off: SL65 MIDI 0.566 vs 0.632 cores, EL71 AAC 0.610 vs 0.682 (4d7343564d / 90f3562467). 35BE also saves 0.7 s of boot. 35BE's usual shape on guest memory itself, `tcg_fast_iterate_35be_flat` (6b8a64baa5): stopwatch +6.3 %, midi +6.0 %, bobby +4.3 %, towerblox +3.8 %, video +2.1 %. Follow-ups: 8fe212e31d (video 35BE 24.4 → 18.9 % of vCPU), 13c43bfff0 (video +3.8 %), d0b6cad865 (+7.6 %), a2fc4f3414 (MIDI 0.508 → 0.484), fefdb61f9d (SL65 0.594 → 0.531), 2ba75a9b95 (~0.8 %) | Delete the section and its hooks. There is no runtime switch | Unit tests `35be-iterations` (ring modes at shift 0 and 1 since 6b8a64baa5, four mutants caught), `relocated-fast-loop`; differential checkers (not in repo) |
|
||||
| P1 | `hw/arm/pmb887x/dsp/tcg-fast.c.inc` (FILE; `tcg.c` includes it where the section stood, after `tcg_execute_prepared_block`; ~1100 lines: the four tables in `tcg_fast_loops[]` (35BE, 643F, 6489, 64A9), `tcg_fast_run_35be` / `tcg_fast_iterate_35be` / `tcg_fast_iterate_35be_flat` via `TEAK_FAST_LOOP` / `TEAK_FAST_RUNNER`, `tcg_fast_supported`, `tcg_fast_discover`, `_relocate`, `_lookup`, `_invalidate`, `_verify`, `tcg_execute_fast`); hooks in `tcg.c`, marked: `tcg_prepare_block`, the program-write paths, `HELPER(teak_tcg_chain)`, the slice runners and the forward declarations; `core.h` `fast_runs` | Hot GSM correlator loops run as C kernels instead of chained TCG blocks. The runner executes only the instructions the four tables hold (`tcg_fast_supported` admits exactly those). The general 35BE iteration and its walks are gone: a census on 2026-11-21 counted 0 general iterations on bobby, towerblox, midi, video and an EL71 boot (1.07–1.85M flat iterations per run); an iteration the flat one refuses falls to the per-instruction runner | All loops on vs off: SL65 MIDI 0.566 vs 0.632 cores, EL71 AAC 0.610 vs 0.682 (4d7343564d / 90f3562467). 35BE also saves 0.7 s of boot. 35BE's usual shape on guest memory itself, `tcg_fast_iterate_35be_flat` (6b8a64baa5): stopwatch +6.3 %, midi +6.0 %, bobby +4.3 %, towerblox +3.8 %, video +2.1 %. Follow-ups: 8fe212e31d (video 35BE 24.4 → 18.9 % of vCPU), 13c43bfff0 (video +3.8 %), d0b6cad865 (+7.6 %), a2fc4f3414 (MIDI 0.508 → 0.484), fefdb61f9d (SL65 0.594 → 0.531), 2ba75a9b95 (~0.8 %) | Delete the file, its `#include` and the marked hooks. There is no runtime switch | Unit tests `35be-iterations` (ring modes at shift 0 and 1 since 6b8a64baa5, four mutants caught), `relocated-fast-loop`; differential checkers (not in repo) |
|
||||
| P2 | Temp pool (near the top of the file) | Reuses TCG temps so that 64-instruction blocks fit TCG_MAX_TEMPS | Not measured. Load-bearing: without it blocks are halved | Restore upstream temp allocation | — |
|
||||
| P4 | `tcg_remove_dead_state_stores`, `tcg_call_hides_state`; `dsp.c` + `runtime.c` / `.h` `dsp_runtime_get_trace_pc` | Removes flag, pc and state stores that the next instruction overwrites | State stores: −0.6 / −0.9 % (4c84885f3c). pc stores: Bobby −0.85 % (37b179e59c). Flags not measured. Removing it on 2026-11-04: bobby −1.5 %, towerblox −1.2 % | Drop the pass and return `dsp.c` to `dsp_runtime_get_pc`. P6 relies on the pass | — |
|
||||
| P5 | `tcg_demote_label_dead_temps` | Demotes temps that are dead across labels | Bobby 1.079 → 1.034 (4ace13cbc9) | Delete the call and the function | — |
|
||||
| P6 | `tcg_emit_inline_register_read`, `tcg_emit_inline_mov_accumulator_write`, `tcg_emit_inline_alb_register` | Inline register reads, mov to accumulator halves and register ALB ops | Bobby 0.949 → 0.927 (b2e3e17771). Bobby vratio +3.0..3.8 %, video +0.5..3.3 % (6a18783ada) | Restore the helper calls | Checkers `albchk.py` / `movchk.py` (not in repo) |
|
||||
| P7 | `tcg_emit_shift_by_value` and its use in `tcg_emit_shift_conditional` | Inline accumulator shift by the shift-value register | Bobby +1.8 %, MIDI +0.5 %, noisy; ceiling ~1 % (bdae25233c) | Revert bdae25233c | Checker `shchk.py` (not in repo) |
|
||||
| P8 | `tcg_emit_shifted_product` (branchless); `tcg_emit_accumulator_value_flags` fz/fe reuse | Product-shift arithmetic instead of 4 labels, and flag temp reuse | Not measured (4d7343564d). The flag reuse is load-bearing for P4 | Restore the upstream function bodies | — |
|
||||
| P6 | `tcg_emit_inline_register_read`, `tcg_emit_inline_mov_accumulator_write`, `tcg_emit_inline_alb_register` | Inline register reads, mov to accumulator halves and register ALB ops | Bobby 0.949 → 0.927 (b2e3e17771). Bobby vratio +3.0..3.8 %, video +0.5..3.3 % (6a18783ada). The 14/15 arm: priced with P7 (2026-11-21) | Restore the helper calls | Checkers `albchk.py` / `movchk.py` (not in repo) |
|
||||
| P7 | `tcg_emit_shift_by_value` and its use in `tcg_emit_shift_conditional` | Inline accumulator shift by the shift-value register | Bobby +1.8 %, MIDI +0.5 %, noisy; ceiling ~1 % (bdae25233c). P7, P8's shift and P6's 14/15 arm back at upstream's forms together, 4 pairs each (2026-11-21): midi −3.6 % (se 0.7), towerblox −1.8 % (se 1.4), bobby −1.1 % (se 1.8), video MIPS +0.05 % (se 0.4); they stay | Revert bdae25233c | Checker `shchk.py` (not in repo) |
|
||||
| P8 | `tcg_emit_shifted_product` (branchless); `tcg_emit_accumulator_value_flags` fz/fe reuse | Product-shift arithmetic instead of 4 labels, and flag temp reuse | Not measured alone (4d7343564d); the shift priced with P7 (2026-11-21). The flag reuse is load-bearing for P4 | Restore the upstream function bodies | — |
|
||||
| P9 | Batching of loops that write, repeat bodies and inline plain registers (7a1e2d1106); `level_free` (ab1b086728) | Runs more loop iterations per block entry | Music 0.686 → 0.602 (7a1e2d1106). Music 0.783 → 0.699 (ab1b086728) | Revert those hunks | Unit tests `batched-loop-exit-after-write`, `block-repeat-body-exit-after-write` |
|
||||
| P10 | `HELPER(teak_tcg_chain)` with `core.h` `chain_prev` and `succ[]` in the cache entry, keyed on `tcg_block_cache_epoch` / `succ_epoch`; the wasm64 `target` / `evict_epoch` fields (also in `teak_tcg_chain_link_t`) | Chain-link entry caches. The epoch moves only when entries are added or freed, so the caches survive program-bank switches (about 34k a second on S75). On wasm64, the chain also returns the tagged table index | Video vratio +2.8..3.4 %, Bobby +2.5..3.1 % (3488724de2). Epoch: towerblox +2.4 % (f8612575ce) | Restore the upstream lookup in the chain helper | — |
|
||||
| P10 | `HELPER(teak_tcg_chain)` with `core.h` `chain_prev` (validated by `chain_prev_epoch` against `tcg_block_cache_epoch`; the four clears in the invalidation functions are gone, upstream's text) and `succ[]` in the cache entry, keyed on `succ_epoch`; the wasm64 `target` / `evict_epoch` fields (also in `teak_tcg_chain_link_t`) | Chain-link entry caches. The epoch moves only when entries are added or freed, so the caches survive program-bank switches (about 34k a second on S75). On wasm64, the chain also returns the tagged table index | Video vratio +2.8..3.4 %, Bobby +2.5..3.1 % (3488724de2). Epoch: towerblox +2.4 % (f8612575ce) | Restore the upstream lookup in the chain helper | — |
|
||||
| P11 | `HELPER(teak_tcg_chain)`: the branch that prepares a repeat-headed or over-budget block; `core.h` `chain_slice_limit`, set in `tcg_execute_cached_slice` and cleared in `teak_tcg_execute_slice` / `teak_tcg_execute_block`; the `dynamic_cycles` test in `tcg_chain_exit_link` | The chain helper enters a block that starts with a repeat, or is longer than the remaining budget, as the cached slice loop would on the way back in, instead of stopping for it | towerblox +1.2 % (8 pairs), video +2.5 % (4), midi +0.9 % (8), bobby +0.4 %, stopwatch +0.2 % (`455f756d82`). 2M of 3.5M block entries on SL65 MIDI were such stops | Restore the two stops in the helper and drop the field | Old-vs-new native lockstep, 1.5e9 instructions: S75, EL71, SL65 identical |
|
||||
| P12 | `tcg_emit_branch_if_any_flag`, `tcg_emit_branch_if_link_field_differs_u16` and their use in `tcg_emit_linked_chain` / `tcg_emit_branch_if_link_mismatch` | The inline chain test reads four byte flags with one load and compares `lp`/`bcn` as one 16-bit value | midi +0.8 % (4 pairs), video +0.9 % (6), bobby +1.0 % (4), towerblox +3.2 % (2), stopwatch +0.5 % (2) (`9e7d3d4ce5`) | Revert to one `tcg_emit_branch_if_nonzero_u8` per flag | Old-vs-new native lockstep as P11 |
|
||||
|
||||
|
|
@ -213,7 +231,7 @@ vcpu-timers.
|
|||
| T4 | `cpu-timers.c` `cpu_clock_owner_shorten_budget_at` | A newly armed timer shortens the budget without a host read | `timer_mod_ns` 1.03 → 0.32 s per 20 s (11699de202) | Return to the host-reading path | all |
|
||||
| T5 | `include/qemu/timer.h` `QEMU_TIMER_ATTR_LAZY`; `qemu-timer.c` `timer_first_eager`, `timer_others_expire_time_ns` | Timers that neither cap the clock nor end the budget | Mechanism of D1 (0c3c3c8c9b) | Only with D1 | all |
|
||||
| T6 | `ui/wasm.c` `wasm_refresh_vcpu`, `wasm_refresh_timer`, `wasm_vcpu_dcl_ops` (marked) | The display refresh as a timer of the virtual clock, on the vCPU thread, in place of the console's realtime timer on the main loop: the vCPU no longer waits out every refresh behind the BQL, and the refresh follows guest time | Pixel 8 Pro: vCPU BQL wait 3.29 → 0.27 %, towerblox +5 to +24 % in the throttled state; desktop free-run +0.6 to +3.0 % (91ad8b0c21) | Delete the timer and `wasm_vcpu_dcl_ops`; `wasm_dcl_ops` serves alone | wasm (the file is the port's) |
|
||||
| B1 | `meson.build`: `-ftrivial-auto-var-init=zero` left out on emscripten | Avoids zeroing every uninitialized local | Video 4.19 % ± 2.88, J2ME 1.45 % ± 1.18 (0a3e5f2ce3) | Move the flag back into `hardening_flags` unconditionally | wasm (meson condition) |
|
||||
| B1 | `meson.build`: upstream's `hardening_flags` list is untouched; on emscripten `-ftrivial-auto-var-init=uninitialized` follows it (the last one wins; objects byte-identical) | Avoids zeroing every uninitialized local | Video 4.19 % ± 2.88, J2ME 1.45 % ± 1.18 (0a3e5f2ce3) | Drop the `if host_os == 'emscripten'` block | wasm (meson condition) |
|
||||
|
||||
## Dependencies between entries
|
||||
|
||||
|
|
@ -279,3 +297,19 @@ a new measurement.
|
|||
- D4's lazy DIF mux rebuild;
|
||||
- the `PMB887X_TRACE_*` and `PMB887X_SIM*` environment: `-debug-channels`
|
||||
and `-device gsm-sim`.
|
||||
- **2026-11-21 review against `3403936c99`:**
|
||||
- R5 natively (it is wasm64 only now);
|
||||
- the bswap, andc, orc, eqv, nand and nor emitters: TCG's generic
|
||||
expansion (the six back measured towerblox −0.3 / +0.2 % against
|
||||
without);
|
||||
- the general 35BE iteration, and the fast-loop interpreter arms no table
|
||||
reached;
|
||||
- the `tb_jmp_cache_hash_func` signature;
|
||||
- upstream's text in four DSP invalidation functions, upstream's lines in
|
||||
`vfp_set_fpcr_masked` (the generation bump is a wasm64-only block),
|
||||
`gen_set_psr`, the `gen_rfe`/eret lines, `hardening_flags`.
|
||||
|
||||
Tried and put back, because the whole candidate lost without them
|
||||
([performance.md](performance.md), 2026-11-21 review cleanup): C1's
|
||||
per-piece loops (video −1.7 %), C6's `memory.c` stash (S75 boot audio),
|
||||
R2's rebuild drop.
|
||||
|
|
|
|||
2
qemu
2
qemu
|
|
@ -1 +1 @@
|
|||
Subproject commit 133f91266b9f6f60176ebf2315206abe12bd9788
|
||||
Subproject commit 94754705d18c63369ff57df9a08e18078de948b4
|
||||
Loading…
Add table
Reference in a new issue