Skip to content

fix: Cache line alignment#316

Merged
zharinov merged 1 commit intomasterfrom
feat/cache-line-alignment
Jan 8, 2026
Merged

fix: Cache line alignment#316
zharinov merged 1 commit intomasterfrom
feat/cache-line-alignment

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 8, 2026

Summary

  • Remove size >= 48 guard from layout algorithm — now ALL instructions get cache-line aligned
  • Add Symbol::PADDING constant and show padding steps as 07 ... in dump output
  • Add cache line separator in trace output (verbose modes only)
  • Strengthen layout tests with specific Match16/Match32 alignment cases

Why

Previously only large instructions (Match48+) got cache line alignment. This caused smaller instructions to straddle 64-byte cache line boundaries, potentially hurting performance. Now the invariant is enforced with an assert.

The padding visualization helps debug layout issues by making padding slots visible in dumps.

@zharinov zharinov changed the title feat: Cache line alignment for all instructions with padding visualization fix: Cache line alignment Jan 8, 2026
@zharinov zharinov force-pushed the feat/cache-line-alignment branch from 390aea4 to 26ed3fe Compare January 8, 2026 23:21
@zharinov zharinov enabled auto-merge (squash) January 8, 2026 23:22
@zharinov zharinov merged commit b8000fc into master Jan 8, 2026
3 checks passed
@zharinov zharinov deleted the feat/cache-line-alignment branch January 8, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant