Skip to contentSkip to conversation

MIPS, How to use floating point in a module?

DISCUSSION [email protected] 2 participants 2 messages Jun 3, 2004

lore
Share & tools
lore
#0 lore raw

Now I am told that our next target will be a MIPS-based CPU. Looking at files under arch and asm includes for MIPS, I don't see any equivalent of the x86 (x87, 686, etc.) functions and macros kernel_fpu_begin, init_fpu, kernel_fpu_end, etc. Is it safe to just barge ahead and use floating-point arithmetic operators when the driver needs to use them?

This CPU has no opcodes for log2, exp2, sin, and cos, so it looks like I'll have to buy one of the books that some posters here kindly recommended, and do polynomial interpolations.

#1 lore raw
Quoted 6 lines · On Wed, 2 Jun 2004 22:39:17 -0500 (CDT) [email protected] wrote:

Now I am told that our next target will be a MIPS-based CPU. Looking at files under arch and asm includes for MIPS, I don't see any equivalent of the x86 (x87, 686, etc.) functions and macros kernel_fpu_begin, init_fpu, kernel_fpu_end, etc. Is it safe to just barge ahead and use floating-point arithmetic operators when the driver needs to use them?

We cannot use the FPU instruction in a MIPS kernel.

Yoichi