[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 16/22] target/loongarch: Add floating point move instructi
|
From: |
Song Gao |
|
Subject: |
Re: [PATCH v2 16/22] target/loongarch: Add floating point move instruction translation |
|
Date: |
Thu, 12 Aug 2021 17:20:34 +0800 |
|
User-agent: |
Mozilla/5.0 (X11; Linux mips64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
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.
- Re: [PATCH v2 16/22] target/loongarch: Add floating point move instruction translation,
Song Gao <=