<feed xmlns='http://www.w3.org/2005/Atom'>
<title>npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/docs/mobile.md, branch docs/pso-cache-scope-note</title>
<subtitle>[no description]</subtitle>
<id>https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=docs%2Fpso-cache-scope-note</id>
<link rel='self' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=docs%2Fpso-cache-scope-note'/>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/'/>
<updated>2026-11-26T00:37:25+00:00</updated>
<entry>
<title>x64_recomp: treat a shift by cl as a writer that may leave the flags alone (#2150 review)</title>
<updated>2026-11-26T00:37:25+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T00:37:25+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=4a1c850a7ae26db84f116cca606c77834b1445b7'/>
<id>urn:sha1:4a1c850a7ae26db84f116cca606c77834b1445b7</id>
<content type='text'>
x86 changes no flag for a shift or rotate whose masked count is 0. The
first version patched ARM's carry when cl is 0, taking CF from ctx when no
carry writer came before the shift in its block. But flag liveness treated
the shift as always writing, so a writer in an earlier block never stored
its word, and ctx held a stale CF: cmp r8d, 2 (r8d = 1); jmp; mov cl, 0;
shl eax, cl; setc read 0 instead of 1.

_flag_analysis now treats a shift by cl as a conditional writer: liveness
does not kill the flags it writes, the writer before it stores its word as
well, and a consumer behind it reads the ctx word. With cl = 0 the shift
is skipped whole, its flag store included, so ctx keeps the earlier word.
The ARM-carry patching and shift_prev_c go; the immediate-count-0 change
stays.

Tests: the analysis checks of the patching are replaced by checks of the
new rule, and three execution cases are added (a carry from an earlier
block with cl = 0 and cl = 1, and one a logic op cleared). The first one
fails on the previous head.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>tools: x86-64 -&gt; arm64 recompiler groundwork for the mobile path</title>
<updated>2026-11-23T20:47:00+00:00</updated>
<author>
<name>Nolan Cotter</name>
<email>186326284+NolanCotter@users.noreply.github.com</email>
</author>
<published>2026-11-23T20:36:04+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=a2070dfa10a773c13348a868e87f35270f728449'/>
<id>urn:sha1:a2070dfa10a773c13348a868e87f35270f728449</id>
<content type='text'>
tools/x64_recomp.py is the start of the static recompiler the arm64 port
needs: an x86-64 decoder (prefixes/REX, ModRM+SIB, RIP-relative, hi8
regs, immediate forms, groups 1-5/8/15/1A/11) and an arm64 assembler
with label fixups. tools/recomp_census.py counts how much of a PE's
.pdata-declared code the decoder covers. docs/mobile.md records the
route (AOT lift of .text to arm64, macOS first, MoltenVK or SPIRV-Cross
for graphics) and what still blocks iOS.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin &lt;158243242+devin-ai-integration[bot]@users.noreply.github.com&gt;
</content>
</entry>
</feed>
