-
Notifications
You must be signed in to change notification settings - Fork 1.2k
unrecognized opcode `ld.aq a6,0(a4)' #1651
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
Comments
Maybe what you want is |
asm volatile ( |
Where in the RISC-V specifications can you see where Doesn't this: suggest that @kito-cheng is correct above:
For what it's worth this (completely artifical) example assembles OK. I'm using the bare-metal/Newlib toolchain here but the Linux/Glibc toolchain should behave similarly:
Where does this code come from? Maybe not relevant but you are not using the latest toolchain:
However I tried GCC 14.2 and it gives the same error. |
Use riscv64-unknown-linux-gnu-gcc to compile ISA-Rel-Acq.s file. The inline assembly in ISA-Rel-Acq.c contains ld.aq a6,0(a4), which the riscv toolchain cannot recognize
The compilation command is as follows:
riscv64-unknown-linux-gnu-gcc -Wall -std=gnu99 -march=rv64imafdc_zifencei -mabi=lp64d -O2 -pthread -o ISA-Rel-Acq.exe outs.o utils.o litmus_rand.o ISA-Rel-Acq.s --static
riscv64-unknown-linux-gnu-gcc -v is as follows
**riscv64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=riscv64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/opt/riscv/libexec/gcc/riscv64-unknown-linux-gnu/13.2.0/lto-wrapper
Target: riscv64-unknown-linux-gnu
Configured with: riscv-gnu-toolchain/gcc/configure --target=riscv64-unknown-linux-gnu --prefix=/opt/riscv --with-sysroot=/opt/riscv/sysroot --with-pkgversion=gc891d8dc23e-dirty --with-system-zlib --enable-shared --enable-tls --enable-languages=c,c++,fortran --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libsanitizer --disable-nls --disable-bootstrap --src=riscv-gnu-toolchain/gcc --enable-multilib --with-abi=lp64d --with-arch=rv64imafdc_zifencei --with-tune=rocket --with-isa-spec=2.2 'CFLAGS_FOR_TARGET=-O2 -mcmodel=medlow' 'CXXFLAGS_FOR_TARGET=-O2 -mcmodel=medlow'
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.0 (gc891d8dc23e-dirty)
**
The text was updated successfully, but these errors were encountered: