<feed xmlns='http://www.w3.org/2005/Atom'>
<title>eglantine-cirakg/src/dynarmic, branch nx2</title>
<subtitle>Mirror of github.com/cira0100/Eglantine-public nx2, a fork of Djihads80/Eglantine.</subtitle>
<id>https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2</id>
<link rel='self' href='https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2'/>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/'/>
<updated>2026-11-01T20:13:32+00:00</updated>
<entry>
<title>Merge remote-tracking branch 'origin/fix/dynarmic-faster-regalloc' into test/linux-all-prs-plus</title>
<updated>2026-11-01T20:13:32+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-11-01T20:13:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=ebd9a4aaf9f00cd787ec9b8623b6066cca3f9f02'/>
<id>urn:sha1:ebd9a4aaf9f00cd787ec9b8623b6066cca3f9f02</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'origin/fix/dynarmic-compact-block-tables' into test/linux-all-prs-plus</title>
<updated>2026-11-01T20:13:31+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-11-01T20:13:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=f21d6c0a49a90fd6ec919de438a07da11ead12d9'/>
<id>urn:sha1:f21d6c0a49a90fd6ec919de438a07da11ead12d9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>dynarmic: commit x64 code cache memory as code is emitted</title>
<updated>2026-10-31T04:27:24+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-31T04:27:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=e9f31461b6ff98643bc2bfe330914d57b5facf38'/>
<id>urn:sha1:e9f31461b6ff98643bc2bfe330914d57b5facf38</id>
<content type='text'>
Xbyak's default allocator commits the whole code cache up front: 512 MiB
per emulated core, 3 GiB of commit charge for six cores, of which a game
fills a small part (Mario Kart World: ~80-120 MiB per core). On Windows,
reserve the space instead and let EnsureMemoryCommitted, which already
runs before every emission, commit it in 4 MiB steps. Other platforms
keep the default allocator (their mappings commit on first touch).
</content>
</entry>
<entry>
<title>dynarmic: skip untouched locations when an IR instruction ends</title>
<updated>2026-10-30T13:25:45+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-30T13:25:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=e6d53e728a93fe6d97a243de41301b9f7c54df5a'/>
<id>urn:sha1:e6d53e728a93fe6d97a243de41301b9f7c54df5a</id>
<content type='text'>
Compiling a block is most of what makes Mario Kart World stutter in its
first minute: the game's thread translates ~20,000 blocks in a few
hundred milliseconds when a scene loads, and the frame waits. A CPU
profile of those bursts had ~40% of the compile time in two loops over
all 96 host locations (16 GPRs, 16 XMMs, 64 spill slots) per IR
instruction:

- EndOfAllocScope called ReleaseAll on every location, though an
  instruction touches a few. It now skips the ones ReleaseAll would not
  change (no references or locks, not scratch, no last use pending, and
  values either still live or fully cleared).
- DefineValueImpl checked, with an assert that stays on in release
  builds, that the defined value was in no location yet, and afterwards
  that it was where it was put. Those scans are DEBUG_ASSERTs now.

Mario Kart World, first 45 s (boot, world map, title, attract demo):
18.5 -&gt; 12.8 us per compiled block; frames over 60 ms 57 -&gt; 31, over
100 ms in the first 600 presents 23 -&gt; 12; frames render as before.
</content>
</entry>
<entry>
<title>dynarmic: keep the x64 JIT's per-block tables compact</title>
<updated>2026-10-30T13:13:52+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-30T13:10:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=34f81e052c37973a69aeec39e2f996b89c80e4ad'/>
<id>urn:sha1:34f81e052c37973a69aeec39e2f996b89c80e4ad</id>
<content type='text'>
Each emulated core has its own JIT, and Mario Kart World runs six. After
three minutes of its title screen and attract demo, their bookkeeping
held ~1.65 GB besides ~470 MB of compiled code, mostly empty slots:

- patch_information: four small_vectors of code pointers per linked
  block (232 bytes a slot), and Patch() added an entry for every block
  compiled, linked or not (~800 MB);
- block_ranges: an interval map with a hash set per segment (~300 bytes
  a block, ~460 MB) to answer invalidations, which only come when code
  is unmapped or reprotected;
- fastmem_patch_info: 48 bytes per fastmem access in a hash map
  (~340 MB).

Patch locations are now offsets into the code space with the patch kind
in the low two bits, two inline and the rest in a vector, and Patch()
no longer creates entries. Block ranges are a flat list scanned on
invalidation (also dropping the invalidated blocks' ranges, the old
TODO). Fastmem patch information is a list sorted by code offset (code
is emitted in address order, so inserts are appends) with 24-byte
entries, looked up by binary search when an access faults.

Mario Kart World, 180 s: resident private memory at 150 s 6195 -&gt;
4777 MiB, peak commit 16.0 -&gt; 14.4 GB; frames and frame times unchanged.
</content>
</entry>
<entry>
<title>core: emulate six CPU cores</title>
<updated>2026-10-28T15:29:20+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-28T15:29:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=3b1639daa3650faf1b56906524b75f019f707f00'/>
<id>urn:sha1:3b1639daa3650faf1b56906524b75f019f707f00</id>
<content type='text'>
Switch 2 applications are given cores 0..5 (title 4's npdm) and start a
job worker per core. With four emulated cores, 4 and 5 were folded onto
0 and 1, so two cores ran two workers each. Switch 1 titles keep using
cores 0..3; core 3 stays the shared system core.
</content>
</entry>
<entry>
<title>dynarmic: decode ARMv8.1-8.5 instructions used by Switch 2 code</title>
<updated>2026-10-27T15:46:04+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-27T15:46:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=11aac324010eb2fe3c0fc9dca3c196f33aaef10c'/>
<id>urn:sha1:11aac324010eb2fe3c0fc9dca3c196f33aaef10c</id>
<content type='text'>
Switch 2 titles are built for a Cortex-A78C class core. Scanning one title's
.text with dynarmic's own decoder table found ~115k RETAB, ~37k LDAPR,
~25k LSE atomics, ~6.6k CAS, ~2.5k SWP plus a few CASP/XPAC/PAC/STG, none of
which dynarmic decoded (only the declarations existed).

- LSE atomics, SWP, CAS, CASP: exclusive load + op + exclusive store; on
  store failure no register is written and the instruction is retried
  (CheckBit terminal), so it stays atomic across cores.
- LDAPR: ordered load, like LDAR.
- Pointer authentication: identity (nothing is ever signed). RETAA/RETAB,
  BRA*/BLRA*, LDRAA/LDRAB, PAC*/AUT*/XPAC*, PACGA.
- MTE: tags are always 0; STG/ST2G only write back, STZG/STZ2G zero the
  granules, STGP stores the pair, IRG/GMI/ADDG/SUBG ignore tags.

tools/nx2/a64_coverage.py reports which encodings in an NSO's .text the
decoder table does not match.
</content>
</entry>
<entry>
<title>[dynarmic] fix bad arm codegen on relocations (#4458)</title>
<updated>2026-09-19T22:29:28+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-09-19T22:29:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=908b1e9a3701f142de51e133d910aa058d4b071c'/>
<id>urn:sha1:908b1e9a3701f142de51e133d910aa058d4b071c</id>
<content type='text'>
In an earlier version I had these as constants which were referred to via `db`, I haphazardly left the LDR and didn't notice.
Even still relocations apply to only 1 ins at a time.

Fixes regressions on #4158

Signed-off-by: lizzie &lt;lizzie@eden-emu.dev&gt;

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4458
Reviewed-by: CamilleLaVey &lt;camillelavey99@gmail.com&gt;
Reviewed-by: MaranBr &lt;maranbr@eden-emu.dev&gt;
</content>
</entry>
<entry>
<title>[dynarmic] Coalesce non-exclusive Write/Read fallback functions (#4158)</title>
<updated>2026-09-18T23:39:46+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-09-18T23:39:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=9a30172e45fcb7833cc49ba4d6450211449b14df'/>
<id>urn:sha1:9a30172e45fcb7833cc49ba4d6450211449b14df</id>
<content type='text'>
the general idea is to have a common procedure form whom to call
this way theres less "jumping around" for values of different sizes
additionally this **should** allow for better codegen since
most of the u8,u16,u32,u64 can be held within a u64
theoretically this means that you could deifne callbacks in suck
a way that it's essentially as costly as a `mov r64, m64`
but that's not doable due to the fact we have to do translations...

Is this a good change?
Primarily aimed for x86 and ARM to benefit, but I suppose LooooooongArch64 can benefit too.

Signed-off-by: lizzie &lt;lizzie@eden-emu.dev&gt;
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4158
Reviewed-by: crueter &lt;crueter@eden-emu.dev&gt;
Reviewed-by: MaranBr &lt;maranbr@eden-emu.dev&gt;
Reviewed-by: CamilleLaVey &lt;camillelavey99@gmail.com&gt;
</content>
</entry>
<entry>
<title>Partial revert: [dynarmic] fix sign extension and optimize vaddr lookups for 64bit on x64 systems (#4446) (#4448)</title>
<updated>2026-09-17T03:52:36+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-09-17T03:52:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=6374f7f51f0254358fc26a0b3a182f06a9d84ec9'/>
<id>urn:sha1:6374f7f51f0254358fc26a0b3a182f06a9d84ec9</id>
<content type='text'>
Breaks Mario Kart 8 Deluxe.

#4446

Signed-off-by: lizzie &lt;lizzie@eden-emu.dev&gt;

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4448
Reviewed-by: MaranBr &lt;maranbr@eden-emu.dev&gt;
Reviewed-by: CamilleLaVey &lt;camillelavey99@gmail.com&gt;
</content>
</entry>
</feed>
