diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-23 15:52:20 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 07:16:30 -0500 |
| commit | c9013c0af1aa8a43f703f2f7dbd5f0ad40605f6a (patch) | |
| tree | e244e8267a21624db58304816012ac6461bc35f2 /runtime/opus_decoder/leonida_opus_decoder.h | |
| parent | ff4392ef70724a3809a7607cd7538fc0c9567891 (diff) | |
d3d12_device_calls: a jmp within the walked function is a branch, not a tail call (review of old upstream PR 7998)
Every E9 was a tail call, including the `jmp rel32` MSVC emits for a long branch inside a function.
With the device in an argument register, such a jump counted as the device passed to another call,
it cleared the state, and it ended a window walk early (YordiLorenzo, pr-sorter). Slot 14 dropped out
of the fixture with pr-sorter's patch.
The walk now follows forward branches. A `jmp` (E9 or EB) or a conditional branch to a later
address in the walked range carries the known state to its target. There it is met with the
fall-through's state, keeping a fact only when both paths agree (vtable loads from either path are
merged). Past a `ret` or unconditional jump, the carried state replaces it. A jump back into the range
(a loop) carries nothing and isn't a tail call. Only a `jmp` out of the range is a tail call.
pr-sorter's repro is a test, together with the short form and a backward jump.
Census on the 1.0.2.1 executable: 83 -> 95 sites, still 42 slots, with no site or slot lost. 12 more
sites are behind a conditional branch around an early return: slot 17 (+5), slot 24 (+5), slot 133
(+2). Not resolved stays at 12: vtable loads with no matched call 2 -> 1, calls handed the device
9 -> 10, stores 1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/opus_decoder/leonida_opus_decoder.h')
0 files changed, 0 insertions, 0 deletions