Karim BELABAS on Wed, 15 Nov 2000 13:02:20 +0100 (MET)

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

Re: [GP/PARI] 2.0.21 bug in exp()?

> (Karim, is this another incarnation of the recent problem with the
> shift macros...?)

No. Also, there hasn't been any problem with the shift macros [Background:
Igor Schein reported that on Solaris + gcc-2.97 + -O1 optimization the
function addsmulsi (undocumented) sometimes gave bogus answers. gcc-2.95 was
fine. We suspected a set of macros first. ].

It turned out to be aggressive (but correct) register allocation by gcc-2.97,
which interfered with the inlined assembler, resetting flags before we could
check them. I permuted two instructions in the C code so as to read the
register content immediately, and the problem is gone.

Karim Belabas                    email: Karim.Belabas@math.u-psud.fr
Dep. de Mathematiques, Bat. 425
Universite Paris-Sud             Tel: (00 33) 1 69 15 57 48
F-91405 Orsay (France)           Fax: (00 33) 1 69 15 60 19
PARI/GP Home Page: http://www.parigp-home.de/