On 07/23/2021 02:29 PM, Richard Henderson wrote:
>
>> +void helper_movgr2fcsr(CPULoongArchState *env, target_ulong arg1,
>> + uint32_t fcsr)
>> +{
>> + switch (fcsr) {
>> + case 0:
>> + env->active_fpu.fcsr0 = arg1;
>> + break;
>> + case 1:
>> + env->active_fpu.fcsr0 = (arg1 & FCSR0_M1) |
>> + (env->active_fpu.fcsr0 & ~FCSR0_M1);
>> + break;
>> + case 2:
>> + env->active_fpu.fcsr0 = (arg1 & FCSR0_M2) |
>> + (env->active_fpu.fcsr0 & ~FCSR0_M2);
>> + break;
>> + case 3:
>> + env->active_fpu.fcsr0 = (arg1 & FCSR0_M3) |
>> + (env->active_fpu.fcsr0 & ~FCSR0_M3);
>> + break;
>
> This is easily implemented inline, followed by a single helper call to
> re-load the rounding mode (if required by the mask).
Hi, Richard,
Sorry to bother you, When I was revising this patch, I found that I didn't seem
to understand your opinion.
Could you explain it in detail? thank you very much.
Thanks
Song Gao.