mirror of
https://github.com/openssl/openssl.git
synced 2025-01-24 13:55:42 +08:00
Add ROTATE inline RISC-V zbb/zbkb asm for DES
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18290)
This commit is contained in:
parent
d272ef5372
commit
6136408e6a
@ -109,6 +109,19 @@
|
||||
: "cc"); \
|
||||
ret; \
|
||||
})
|
||||
# elif defined(__riscv_zbb) || defined(__riscv_zbkb)
|
||||
# if __riscv_xlen == 64
|
||||
# define ROTATE(x, n) ({ register unsigned int ret; \
|
||||
asm ("roriw %0, %1, %2" \
|
||||
: "=r"(ret) \
|
||||
: "r"(x), "i"(n)); ret; })
|
||||
# endif
|
||||
# if __riscv_xlen == 32
|
||||
# define ROTATE(x, n) ({ register unsigned int ret; \
|
||||
asm ("rori %0, %1, %2" \
|
||||
: "=r"(ret) \
|
||||
: "r"(x), "i"(n)); ret; })
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# ifndef ROTATE
|
||||
|
Loading…
Reference in New Issue
Block a user