Skip to content

Copy register cache state before a conditional jump, and reuse it after. - #196

Open
shattered wants to merge 1 commit into
davidgiven:masterfrom
shattered:_29e5069d
Open

shattered wants to merge 1 commit into
davidgiven:masterfrom
shattered:_29e5069d

Conversation

@shattered

Copy link
Copy Markdown
Contributor

This saves about 0.4% of cowfe size (168 bytes) on pdp11.

I think this is safe to apply to switch statements, since there's no fallthough?

@shattered

Copy link
Copy Markdown
Contributor Author

This works even better with a stack, but there's weird interaction with nested functions (cache state from nested function leaks into parent?)

@davidgiven

Copy link
Copy Markdown
Owner

By the time cowbe is reached, any nested functions should be flattered (if I recall correctly, which I may not be).

I am suspicious about RegCacheRevert. I feel like it should be flushing the cache if the label doesn't match; otherwise, the stale cache from before the jump (which is modified to not flush the cache) will still be in effect, because E_jump_checkpoint didn't flush it.

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.

2 participants