On 5/1/20 9:29 AM, 罗勇刚(Yonggang Luo) wrote: > On Fri, May 1, 2020 at 10:18 PM Richard Henderson > <richard.hender...@linaro.org > Step 1 is to rearrange the fp helpers to eliminate > helper_reset_fpstatus(). > I've mentioned this before, that it's possible to leave the steady-state > of > env->fp_status.exception_flags == 0, so there's no need for a separate > function > call. I suspect this is worth a decent speedup by itself. > > Hi Richard, what kinds of rearrange the fp need to be done? Can you give me a > more detailed example? I am still not get the idea.
See target/openrisc, helper_update_fpcsr. This is like target/ppc helper_float_check_status, in that it is called after the primary fpu helper, after the fpu result is written back to the architectural register, to process fpu exceptions. Note that if get_float_exception_flags returns non-zero, we immediately reset them to zero. Thus the exception flags are only ever non-zero in between the primary fpu operation and the update of the fpscr. Thus, no need for a separate helper_reset_fpstatus. r~