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

Risc-V and mips support ? #3

Open
eix128 opened this issue Feb 24, 2020 · 3 comments
Open

Risc-V and mips support ? #3

eix128 opened this issue Feb 24, 2020 · 3 comments

Comments

@eix128
Copy link

eix128 commented Feb 24, 2020

is there any support for risc-v and mips in future ?

@Wunkolo
Copy link
Owner

Wunkolo commented Feb 25, 2020

Not really...
I don't have a MIPS or Risc-V machine to research code on but I am very open to PRs!

@eix128
Copy link
Author

eix128 commented Feb 26, 2020

hmm , what about Qemu VM to test ?

@Wunkolo
Copy link
Owner

Wunkolo commented Feb 27, 2020

I suppose so. MIPS has a flag that can be enabled in user-space that causes all load/store instructions to use a reverse byte endian, so a pattern I would imagine for a MIPS64 implementation of qReverse would be

Reverse64:
        dsbh    $2,$4
        dshd    $2,$2

which is how __builtin_bswap64 is implemented. So, in theory building qReverse on a gcc compiler targetting MIPS64 would already see speedups. So that work is implicitly already done.

RISC-V doesn't exactly lend itself to a fast in-register byte reverse though I don't think. I've never worked with either and can't think of an instruction that would lend itself for a qReverse acceleration.

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