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

[patches] e500 prctl usage



Hi Kumar,

I'm looking at another batch of e500 fenv-related failures, similar to
my last patch.  I'm hoping you can enlighten me a bit here.

First of all, the usage in glibc clearly does not match the kernel.
This will be easy enough to fix, but it raised a red flag.  The kernel
expects SPE uses to always set PR_FP_EXC_SW_ENABLE but glibc never
does, so there are EINVALs all over the place.

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.

-- 
Daniel Jacobowitz
CodeSourcery