[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patches] e500 prctl usage
- To: Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>
- Subject: Re: [patches] e500 prctl usage
- From: "Joseph S. Myers" <joseph@xxxxxxxxxxxxxxxx>
- Date: Fri, 31 Aug 2007 16:12:42 +0000 (UTC)
On Fri, 31 Aug 2007, Daniel Jacobowitz wrote:
> Secondly, while looking at this, I had to wonder: what's the point of
> using prctl for this? Glibc directly writes the SPEFSCR to set the
> rounding mode, so it obviously can do so. I would expect the FINXE,
> FINVE, FDBZE, FUNFE, and FOVFE bits to be writable too and to be both
> necessary and sufficient. Right now nothing is setting them so I
> don't know why we would end up with a trap.
>
> I couldn't find a big-picture comment anywhere explaining that,
> but there's probably a reason I'm not familiar with.
My supposition - from the E500 documentation without having checked what
the kernel actually does - was that the processor exceptions always need
to be enabled in order for the kernel to take the traps and fix up the
results for IEEE semantics, and so the kernel needs to keep separate track
of which exceptions are user-visibly enabled.
--
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx