I am attempting to test a custom extension on RISC-V QEMU, the instruction is of i-type, and I am using a PC variable as an immediate to be offsetted, my standard technique has been to use
asm volatile(".insn i opcode, func3, %0, %1, %2" : "=r"(result) : "r"(rs1) : "imm"(someconstant));
However, I am thrown the error "error: expected ')' before '(' token"
Leading me to believe that I am not substituting in the immediate value correctly, I am unsure what exactly is used in directive call to refer to the immediate as I can scarcely find anything for I-type instructions online, only examples referring to the R-type instructions. Would anyone be able to point me in the appropriate syntax for an I-type directive?