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

Does a4 have to be sacrificed in bzero/bcopy? #82

Open
mikrosk opened this issue Nov 18, 2024 · 2 comments
Open

Does a4 have to be sacrificed in bzero/bcopy? #82

mikrosk opened this issue Nov 18, 2024 · 2 comments

Comments

@mikrosk
Copy link
Member

mikrosk commented Nov 18, 2024

Both bzero and bcopy contains same comment:

| exclude a4 because of -mbaserel

| exclude a4 because of -mbaserel

essentially crippling performance with omitting a4 register in the copy loop. Is this still relevant? It has been there since the initial revision.

@th-otto
Copy link
Contributor

th-otto commented Nov 18, 2024

I think its not relevant for us (maybe it was based on some amiga example). We don't have any libraries that are compiled with -mbaserel, and even if we have, i guess there will be other places where a4 is not preserved in assembler code.

But does it really cripple performance? Instead of copying 5*44+36 bytes, you could then copy/zero 5*48+16 bytes, but that are still 6 movem.

@mikrosk
Copy link
Member Author

mikrosk commented Nov 18, 2024

But does it really cripple performance? Instead of copying 5*44+36 bytes, you could then copy/zero 5*48+16 bytes, but that are still 6 movem.

Hmm, true. I guess this could pay off in case we unroll the loop for 512B blocks.

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

No branches or pull requests

2 participants