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

cleanup: Avoid conversion to char* for byte swap code. #77

Merged
merged 1 commit into from
Apr 14, 2024

Conversation

iphydf
Copy link
Contributor

@iphydf iphydf commented Apr 5, 2024

Compiled code for e.g. be64 on x86_64 (a LE system):

be64:
    movq    %rdi, %rax
    bswapq  %rax
    retq

This is optimal code.

Compiled code for e.g. `be64` on x86_64 (a LE system):

```
be64:
    movq    %rdi, %rax
    bswapq  %rax
    retq
```

This is optimal code.
@camgunz
Copy link
Owner

camgunz commented Apr 14, 2024

Ooo love it, thanks!

@camgunz camgunz merged commit 32192b3 into camgunz:master Apr 14, 2024
1 check passed
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