-
Notifications
You must be signed in to change notification settings - Fork 834
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 ChaCha20: assembly implementations #7818
Conversation
ChaCha20: scalar and vector implementations vector implementations doing 6, 4, 2, 1 block at a time. scalar implemetations using roriw and pack vector implementations using VROR_VI and roriw. RISC-V SHA-256: avoid using s0 if it can be helped.
51dbbea
to
ebb49b6
Compare
retest this please |
HiFive Unleashed at 1.4GHz:
For reference here are the numbers without riscv-asm:
|
Annoying. All that work and a slight regression! |
If this is works and isn't slower than before then please merge. |
Updated benchmarks: SHA256 17% faster.
|
Description
ChaCha20:
scalar and vector implementations
vector implementations doing 6, 4, 2, 1 block at a time.
scalar implemetations using roriw and pack
vector implementations using VROR_VI and roriw.
RISC-V SHA-256: avoid using s0 if it can be helped.
Testing
./configure '--disable-shared' '--enable-chacha' 'LDFLAGS=--static' '--host=riscv64' 'CC=riscv64-linux-gnu-gcc' '--enable-riscv-asm'
./configure '--disable-shared' '--enable-chacha' 'LDFLAGS=--static' '--host=riscv64' 'CC=riscv64-linux-gnu-gcc' '--enable-riscv-asm=zbb'
./configure '--disable-shared' '--enable-chacha' 'LDFLAGS=--static' '--host=riscv64' 'CC=riscv64-linux-gnu-gcc' '--enable-riscv-asm=zbkb'
./configure '--disable-shared' '--enable-chacha' 'LDFLAGS=--static' '--host=riscv64' 'CC=riscv64-linux-gnu-gcc' '--enable-riscv-asm=zv'
./configure '--disable-shared' '--enable-chacha' 'LDFLAGS=--static' '--host=riscv64' 'CC=riscv64-linux-gnu-gcc' '--enable-riscv-asm=zv,zvbb'
./configure '--disable-shared' '--enable-chacha' 'LDFLAGS=--static' '--host=riscv64' 'CC=riscv64-linux-gnu-gcc' '--enable-riscv-asm=zv,zvbb,zbb'
./configure '--disable-shared' '--enable-chacha' 'LDFLAGS=--static' '--host=riscv64' 'CC=riscv64-linux-gnu-gcc' '--enable-riscv-asm=zv,zvbb,zbkb'
Checklist