Skip to content

Tags: imakris/mexce

Tags

1.0.2

Toggle 1.0.2's commit message
Share RAX cache across compile_elist calls in asmd_optimizer

Enable sharing the RAX address cache between consecutive compile_elist
calls when generating x87 code for flattened add/sub/mul/div chains.
This eliminates redundant 'mov rax, addr' instructions when the same
variable address appears in multiple terms.

Key changes:
- Add shared_rax_cache parameter to compile_elist for cross-call caching
- Invalidate cache after emitting function code (may clobber RAX)
- Invalidate cache in asmd_optimizer after emit_apply_op_with_constant
  and emit_load_constant which both overwrite RAX

The bug fix (invalidating after function code) was essential - without it,
stale cache values would cause the generated code to skip necessary
'mov rax, addr' instructions, leading to crashes when accessing memory
through an invalid RAX value.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

v1.0.1

Toggle v1.0.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge pull request #51 from imakris/codex/generate-changelog-for-rele…

…ase-1.0.1

Prepare 1.0.1 release changelog

v1.0.0

Toggle v1.0.0's commit message
Initial stable release