riscv-crypto icon indicating copy to clipboard operation
riscv-crypto copied to clipboard

`Error: unrecognized opcode` -- how to get started with crypto instructions?

Open lianakoleva opened this issue 1 year ago • 3 comments

When I run make all CONFIG=rv64-baseline, I get Error: unrecognized opcode `roriw t1,t1,t13`, which is part of Zbkb extension. When I look in riscv-crypto/benchmarks/config/rv64-zscrypto.conf, the architecture doesn't seem to include the Zbkb extension: https://github.com/riscv/riscv-crypto/blob/e2dd7d98b7f34d477e38cb5fd7a3af4379525189/benchmarks/config/rv64-zscrypto.conf#L24 This architecture is then passed to the compiler.

Broadly, I am confused on how to get things running initially. I installed everything as directed in riscv-crypto/tools/README.md. The resulting toolchain version is

$ riscv-unknown-elf-gcc -v
Using built-in specs.
COLLECT_GCC=riscv64-unknown-elf-gcc
COLLECT_LTO_WRAPPER=/home/liana/riscv-crypto/build/riscv64-unknown-elf/libexec/gcc/riscv64-unknown-elf/10.2.0/lto-wrapper
Target: riscv64-unknown-elf
Configured with: /home/liana/riscv-crypto/extern/riscv-gnu-toolchain/riscv-gcc/configure --target=riscv64-unknown-elf --prefix=/home/liana/riscv-crypro/build/riscv64-unknown-elf --dsiable-shared --disable-threads --enable-languages=c,c++ --with-system-zlib --enable-tls --with-newlib --with-sysroot=/home/liana/riscv-crypto/build/riscv64-unknown-elf/riscv64-unknown-elf --with-native-system-header-dir=/include --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libgomp --disable-nls --disable-tm-clone-registry --src=/home/liana/riscv-crypto/extern/riscv-gnu-toolchain/riscv-gcc --enable-multilib --with-abi=lp64d --with-arch=rv64imafdc --with-tune=rocket 'CFLAGS_FOR_TARGET=-Os   -mcmodel=medlow' 'CXXFLAGS_FOR_TARGET=-Os   -mcmodel=medlow'
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (GCC)

I haven't had any success getting cryptography instructions compiled. Any help appreciated!

lianakoleva avatar Nov 02 '23 11:11 lianakoleva