From: NIIBE Y. <gn...@ch...> - 2000-11-11 02:34:51
|
Jesper Skov wrote: > If I'm not mistaken, the SH implementation of lazy FPU switching isn't > really lazy. It always saves the FPU state on a context switch: The meaning of "lazy" is different. If the process uses FPU, the state is saved at the context switch. Saved state is not re-loaded, until FPU is used again (this part is "lazy"). Well, in other word, current implementation does lazy re-loading of FPU state, while it doesn't do lazy saving. > I think the current implementation is probably due to being based on > the i386 where (apparently) there's no gain in lazy switching. There's gain: Reducing context switch time. > Probably would make sense to clear out the FPU when not used, > allowing the FPU circuitry to be powered down [if that's possible > in the SH4 CPUs]. AFAIK, there's no such power down mode for FPU? Is there? BTW, I have another plan. With new GCC, we have the flag -m4-nofpu, I will introduce this flag for SH-4 kernel to avoid using FPU for division. -- |