Hi all,
Good day. I am trying to run a code using riscv32-unknown-elf-gcc, but every time it is giving the same result as :
Assembler messages:
Error: internal: bad RISC-V opcode (bits 0xffffffffffff8f80 undefined): slti
Fatal error: internal: broken assembler. No assembly attempted
But, in my code, there's no 'slti' opcode has been used.
My code is:
'
int mult() {
int a=1000,b=3;
return a*b;
}
int main() {
mult();
}
'
I am trying to run the code using the following command:
riscv32-unknown-elf-gcc -g mul.c -o mul
If I am trying to run other codes, it is also giving the same error again and again.
I tried the following commands:
./configure --help | grep abi
./configure --prefix=/opt/riscv32/bin --with-arch=rv32im --with-abi=ilp32
sudo make clean
sudo make all
export PATH=/opt/riscv32/bin:$PATH
riscv32-unknown-elf-gcc -g mul.c -o mul
Your time and consideration is appreciated.
Thanks in advance!
Sincerely,
Soham.