--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/f9377a84-5b28-4aa4-b51d-aeae04c85274n%40groups.riscv.org.
However, if I instead want to pass the rounding mode as an argument to inline assembly like so:asm volatile (
"fcvt.s.w fa5, %[a];" // convert int a to float in register fa5
"fcvt.s.w fa6, %[b];"
"fmul.s fa7, fa5, fa6, %[frm];"
"fcvt.w.s %[rf], fa7"
: [rf] "=r" (rf)
: [a] "rm" (f[i]) ,
[b] "rm" (f[j]) ,
[frm] "s" ("rtz") // also tried "X" instead of "s" (reference: https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html)
);There's an error:Error: illegal operands `fmul.s fa7,fa5,fa6,.LC4'
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CABpcLcTDbYO9wM5DxH5dmBEZCK0rwaL9j6K%3DdNhek_qs53_%3Djg%40mail.gmail.com.