From: David Given <dg@tao-group.com>
To: linuxppc-dev@lists.linuxppc.org
Subject: Re: Strange FPU/threads problem
Date: Fri, 23 Nov 2001 17:08:47 +0000 [thread overview]
Message-ID: <01112317084703.18383@pearl> (raw)
In-Reply-To: <0111201816350A.15049@pearl>
On Tuesday 20 November 2001 18:16, David Given wrote:
[...]
> However, if I compile it so that it *does* use threads, it bails with a
> SIGFPE the first time in encounters a floating point instruction. And I
> don't know why.
[...]
I've done some more research. The thing that's causing the exception is
arch/ppc/kernel/traps.c+291 (for Linux version 2.4.15), claiming an IEEE FP
exception. The relevant code is:
if (regs->msr & 0x100000) {
/* IEEE FP exception */
_exception(SIGFPE, regs);
}
Now, my copy of the 601 manual claims that only bits 27 to 16 of the MSR are
defined, which translates to bits 5 to 15 in the real world, because the 601
manual numbers the bits the wrong way round throughout[1]. Which means that
bit 20, above, is undefined. MSR turns out to be:
00010F930
What *is* that bit 20? According to the MSR, the FPU is enabled, FE0=FE1=1
(precise mode)... could the processor be generating the exception because the
thing being loading into the FPU isn't a valid double? In which case, how
come my code works when threads are disabled?
I could really use some help here.
[1] DIE DIE DIE
--
David Given
dg@tao-group.com
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2001-11-23 17:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-20 18:16 Strange FPU/threads problem David Given
2001-11-23 17:08 ` David Given [this message]
2001-11-23 19:24 ` Gabriel Paubert
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=01112317084703.18383@pearl \
--to=dg@tao-group.com \
--cc=linuxppc-dev@lists.linuxppc.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.