In http://gcc.gnu.org/ml/gcc/2006-05/msg00047.html, you wrote:

  Ok, I'll bite.  Why are there two of them?!

Well, this is the real reason why we need an API and not just a simple
builtin.  GCC uses that table of values to quickly switch the FPU
modes between single and double precision.  However, it discards all
the other fpscr bits at that time, unless the table is also updated.

So, if you want to set a specific bit in fpscr, you have to not only
set the actual $fpscr, but also all the entries in that table -
however many there may be at the moment.  There are currently two.

Well, if changing fpscr and fpscr_values at the same time was your
only concern, you could just call __set_fpscr.  That puts the burden
of preserving the SZ / PR bit in fpscr on the caller, though.
(i.e. read the current value of fpscr, modify the bits you want changed,
place that changed value into r4, and call __set_fpscr).



Reply via email to