As we have been facing some issues with Mono project pertaining to the MIPS architecture, I wanted to ask a question.
We have Mediatek MT7628AN mipsel-24kec processor(32 bit), and the example program written in C# is to check the preciseness of floating-point calculations on target(MIPS)(no HFPU). The generated output by mcs is working fine on the host(x86) with mono runtime(v 6.12.0.122), meaning that the floating point calculations are precise enough(2 pow 0=1...).
However, for the case of MIPS, the output is rather strange(2 pow 0=0 ...). After tracing the program execution in MIPS, the problem is two-sided. The first is math.pow(a,b) is always returning b itself instead of a^b. The second issue is about Console.WriteLine for double and float. This method cannot even print a double or float value properly. Instead, it is printing some random different numbers.
Even after changing the cross-toolchain option for MIPS(enable-decimal-float), the first issue has not been addressed. Also, I have tried to utilize sdb , and gdb to debug mono runtime ,but not much information since I could not get into CLI functions. When I tried floating point calculations with just C code not using CLI, it is working fine, meaning that the kernel and system can handle the soft floating point calculations. However, when it comes to mono runtime, this error has been facing.
If you have any idea to tackle these issues or know someone relates to them, I really appreciate your sharing.