All of lore.kernel.org
 help / color / mirror / Atom feed
From: haishan <shan.hai@windriver.com>
To: Josh Boyer <jwboyer@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	Hai Shan <haishan.bai@gmail.com>
Subject: Re: [PATCH] Fix float to unsigned conversion failure with SPE enabled
Date: Wed, 17 Nov 2010 09:39:34 +0800	[thread overview]
Message-ID: <4CE33256.3030308@windriver.com> (raw)
In-Reply-To: <AANLkTi=SDjsDgzP=oLduB_Mo6BJCwEPe0q_VZva2VB1a@mail.gmail.com>

Josh Boyer wrote:
> On Sat, Nov 13, 2010 at 11:11 PM, Hai Shan <haishan.bai@gmail.com> wrote:
>   
>> Fixed the failure on converting minus float to unsigned int with SPE enabled
>>
>> Signed-off-by: Hai Shan <shan.hai@windriver.com>
>>     
>
> You should make sure to send PowerPC patches to linuxppc-dev.
>
>   

Thanks for your suggestion, I will send it to linuxppc-dev.

Regards
Shan Hai

> josh
>
>   
>> ---
>>  arch/powerpc/math-emu/math_efp.c |   17 +++++++++++++----
>>  1 files changed, 13 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/powerpc/math-emu/math_efp.c b/arch/powerpc/math-emu/math_efp.c
>> index 41f4ef3..338a128 100644
>> --- a/arch/powerpc/math-emu/math_efp.c
>> +++ b/arch/powerpc/math-emu/math_efp.c
>> @@ -320,7 +320,9 @@ int do_spe_mathemu(struct pt_regs *regs)
>>                        } else {
>>                                _FP_ROUND_ZERO(1, SB);
>>                        }
>> -                       FP_TO_INT_S(vc.wp[1], SB, 32, ((func & 0x3) != 0));
>> +                       /* SB_s: convert from minus float to unsigned int */
>> +                       FP_TO_INT_S(vc.wp[1], SB, 32,
>> +                                       ((func & 0x3) != 0) || SB_s);
>>                        goto update_regs;
>>
>>                default:
>> @@ -458,7 +460,11 @@ cmp_s:
>>                        } else {
>>                                _FP_ROUND_ZERO(2, DB);
>>                        }
>> -                       FP_TO_INT_D(vc.wp[1], DB, 32, ((func & 0x3) != 0));
>> +                       /* DB_s: convert from minus long double to
>> +                        * unsigned long long
>> +                        */
>> +                       FP_TO_INT_D(vc.wp[1], DB, 32,
>> +                                       ((func & 0x3) != 0) || DB_s);
>>                        goto update_regs;
>>
>>                default:
>> @@ -589,8 +595,11 @@ cmp_d:
>>                                _FP_ROUND_ZERO(1, SB0);
>>                                _FP_ROUND_ZERO(1, SB1);
>>                        }
>> -                       FP_TO_INT_S(vc.wp[0], SB0, 32, ((func & 0x3) != 0));
>> -                       FP_TO_INT_S(vc.wp[1], SB1, 32, ((func & 0x3) != 0));
>> +                       /* SB*_s: convert from minus float to unsigned int */
>> +                       FP_TO_INT_S(vc.wp[0], SB0, 32,
>> +                                       ((func & 0x3) != 0) || SB0_s);
>> +                       FP_TO_INT_S(vc.wp[1], SB1, 32,
>> +                                       ((func & 0x3) != 0) || SB1_s);
>>                        goto update_regs;
>>
>>                default:
>> --
>> 1.7.0.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
>>
>>     

WARNING: multiple messages have this Message-ID (diff)
From: haishan <shan.hai@windriver.com>
To: Josh Boyer <jwboyer@gmail.com>
Cc: Hai Shan <haishan.bai@gmail.com>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] Fix float to unsigned conversion failure with SPE enabled
Date: Wed, 17 Nov 2010 09:39:34 +0800	[thread overview]
Message-ID: <4CE33256.3030308@windriver.com> (raw)
In-Reply-To: <AANLkTi=SDjsDgzP=oLduB_Mo6BJCwEPe0q_VZva2VB1a@mail.gmail.com>

Josh Boyer wrote:
> On Sat, Nov 13, 2010 at 11:11 PM, Hai Shan <haishan.bai@gmail.com> wrote:
>   
>> Fixed the failure on converting minus float to unsigned int with SPE enabled
>>
>> Signed-off-by: Hai Shan <shan.hai@windriver.com>
>>     
>
> You should make sure to send PowerPC patches to linuxppc-dev.
>
>   

Thanks for your suggestion, I will send it to linuxppc-dev.

Regards
Shan Hai

> josh
>
>   
>> ---
>>  arch/powerpc/math-emu/math_efp.c |   17 +++++++++++++----
>>  1 files changed, 13 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/powerpc/math-emu/math_efp.c b/arch/powerpc/math-emu/math_efp.c
>> index 41f4ef3..338a128 100644
>> --- a/arch/powerpc/math-emu/math_efp.c
>> +++ b/arch/powerpc/math-emu/math_efp.c
>> @@ -320,7 +320,9 @@ int do_spe_mathemu(struct pt_regs *regs)
>>                        } else {
>>                                _FP_ROUND_ZERO(1, SB);
>>                        }
>> -                       FP_TO_INT_S(vc.wp[1], SB, 32, ((func & 0x3) != 0));
>> +                       /* SB_s: convert from minus float to unsigned int */
>> +                       FP_TO_INT_S(vc.wp[1], SB, 32,
>> +                                       ((func & 0x3) != 0) || SB_s);
>>                        goto update_regs;
>>
>>                default:
>> @@ -458,7 +460,11 @@ cmp_s:
>>                        } else {
>>                                _FP_ROUND_ZERO(2, DB);
>>                        }
>> -                       FP_TO_INT_D(vc.wp[1], DB, 32, ((func & 0x3) != 0));
>> +                       /* DB_s: convert from minus long double to
>> +                        * unsigned long long
>> +                        */
>> +                       FP_TO_INT_D(vc.wp[1], DB, 32,
>> +                                       ((func & 0x3) != 0) || DB_s);
>>                        goto update_regs;
>>
>>                default:
>> @@ -589,8 +595,11 @@ cmp_d:
>>                                _FP_ROUND_ZERO(1, SB0);
>>                                _FP_ROUND_ZERO(1, SB1);
>>                        }
>> -                       FP_TO_INT_S(vc.wp[0], SB0, 32, ((func & 0x3) != 0));
>> -                       FP_TO_INT_S(vc.wp[1], SB1, 32, ((func & 0x3) != 0));
>> +                       /* SB*_s: convert from minus float to unsigned int */
>> +                       FP_TO_INT_S(vc.wp[0], SB0, 32,
>> +                                       ((func & 0x3) != 0) || SB0_s);
>> +                       FP_TO_INT_S(vc.wp[1], SB1, 32,
>> +                                       ((func & 0x3) != 0) || SB1_s);
>>                        goto update_regs;
>>
>>                default:
>> --
>> 1.7.0.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
>>
>>     


  reply	other threads:[~2010-11-17  1:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-14  4:11 Fixed Powerpc SPE data type conversion failure Hai Shan
2010-11-14  4:11 ` [PATCH] Fix float to unsigned conversion failure with SPE enabled Hai Shan
2010-11-16 11:29   ` Josh Boyer
2010-11-16 11:29     ` Josh Boyer
2010-11-17  1:39     ` haishan [this message]
2010-11-17  1:39       ` haishan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CE33256.3030308@windriver.com \
    --to=shan.hai@windriver.com \
    --cc=haishan.bai@gmail.com \
    --cc=jwboyer@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.