You have already asked that question (and got an answer) in gcc-help@:

https://gcc.gnu.org/pipermail/gcc-help/2024-August/thread.html#143628

Johann

Am 08.08.24 um 03:54 schrieb Amit Hiremath:
Hello,

I want to add custom single precision floating point sine, cosine, exp
instructions to risc-v gnu tool chain, and I have designed hardware for
this. I was going through tutorials on how to add custom instructions at:
https://pcotret.gitlab.io/riscv-custom/sw_toolchain.html after adding
custom instructions, I think one has to use asm macro to use custom
instructions in C. Is there anyway where one do not need to use this macro?
I would like the compiler to automatically map to custom instructions in
the risc-v processor, like how it will map to fadd.s, fmul.s instructions,
where one does not need to use asm macro.

I asked in riscv gnu tool chain forum about this issue:
https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1526  they
suggested that I ask this query in the gcc forum.

Can you please guide me?

Many Thanks,
-Amith

Reply via email to