Handling floating point exception
I'm trying to build firmware for K210 using kendryte-toolchain independent of the SDK. After using floating point instructions, I'm hitting exception whenever these instructions (fld, fsd) are executed. However, these instructions are present in SDK also and it works fine there.
So, is there any setting or flag need to be passed to handle floating point instructions?
@nathan Did you get my explanation? Just to update my above point, instructions like
fmv.d.xexecutes without any issues but only the load and store instructions like
fldare creating exceptions with my custom code.
Whenever a floating point instruction is executed by K210, it just throws an exception. And if I read the
mcauseregister at that point, I'm getting the value of 2 as the exception cause which corresponds to "Illegal instruction" as per RISC-V ISA.
@mani_sadhasivam Will you please describe the exception in detail?