From: Shan Hai <shan.hai@windriver.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: math_efp.c: Fixed SPE data type conversion failure
Date: Wed, 17 Nov 2010 10:28:52 +0800 [thread overview]
Message-ID: <1289960933-5172-1-git-send-email-shan.hai@windriver.com> (raw)
The following test case failed on Powerpc sbc8548 with CONFIG_SPE
static float fm;
static signed int si_min = (-2147483647 - 1);
static unsigned int ui;
int main()
{
fm = (float) si_min; ;
ui = (unsigned int)fm;
printf("ui=%d, should be %d\n", ui, si_min);
return 0;
}
Result: ui=-1, should be -2147483648
The reason is failure to emulate the minus float to unsigned integer conversion
instruction in the SPE driver.
next reply other threads:[~2010-11-17 2:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-17 2:28 Shan Hai [this message]
2010-11-17 2:28 ` [PATCH] Fix SPE float to integer conversion failure Shan Hai
2011-03-15 15:51 ` Kumar Gala
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=1289960933-5172-1-git-send-email-shan.hai@windriver.com \
--to=shan.hai@windriver.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).