[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patches] e500 prctl usage



Joseph S. Myers wrote:
> 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.
>
>   
Just looked at the E500 manual and see that E500 does not implement the
MSR FE0/FE1 controls, so ignore what I said before.

I am not sure what is required to present a POSIX/IEEE754 API from the
SPEFSCR because it so different from PowerPC FPSCR and FE0/FE1 controls.