Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't save untouched registers to the stack #25

Open
SamuraiCrow opened this issue Dec 16, 2022 · 0 comments
Open

Don't save untouched registers to the stack #25

SamuraiCrow opened this issue Dec 16, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@SamuraiCrow
Copy link
Contributor

In most 68000 compatible compilers, a MOVEM.L opcode is used to preserve all non-scratch registers to the stack for retrieval just before the execution returns to the calling function. In the case that not all registers are actually touched by the called function, performance is adversely affected by the unnecessary register preservation and retrieval.

Since AmigaE is a 2 pass compiler, it can keep notes on register usage on the first pass while generating the activation record so that the code generation in pass 2 can store and retrieve the registers actually dirtied and leave the rest alone. I think the PPC backend might already do this.

@SamuraiCrow SamuraiCrow added enhancement New feature or request help wanted Extra attention is needed labels Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant