riscv-rust-toolchain
riscv-rust-toolchain copied to clipboard
riscv64imac-unknown-none-elf cross compiler got "error: instruction requires the following: 'M' (Integer Multiplication and Division)"
When I cross-compile RISCV assembly instructions in file.asm with "rustc 1.60.0-nightly (5e57faa78 2022-01-19) riscv64imac-unknown-none-elf" toolchain. I got the following error:
error: instruction requires the following: 'M' (Integer Multiplication and Division)
mul t0, t0, a0
^
Please help, How should I avoid this error ?
Try adding this to your asm file(hope this would work):
.attribute arch, "rv64gc"