Re: math-emu on buildd machine?
On Mon, Jan 14, 2008 at 07:41:11AM +0100, Paolo Bonzini wrote:
> Steve Langasek wrote:
>> On Sun, Jan 13, 2008 at 02:01:41PM +0100, Paolo Bonzini wrote:
>>> Is the math-emu module loaded (or compiled in the kernel) on the buildd
>>> alpha machines? The gnu-smalltalk package is failing for 3.0 because the
>>> emulator converts erroneously a denormal float to double:
>>> st> p:= (FloatE coerce: 1) timesTwoPower: -149.
>>> (2^-149 is actually ~1e-44) despite the program is compiled with -mieee.
>>> If it is, it is a bug in the emulator and the best solution is to XFAIL
>>> the test on alpha. But if it is not loaded, maybe it should...
>> The alpha buildd is an ev68; math-emu is not relevant on that chip.
> So that might be a known errata? The following program should yield
> 1.4013e-45 twice (the bug might show up only at -mieee -O0, I don't know).
> float x = 1.0;
> double y;
> int g(float z)
> printf ("%g\n", z);
Well, AFAICS this is an error; %g refers to a double, and you're passing a
float, so that output would be undefined.
But regardless of whether I add a (double) cast here, and regardless of
whether I use -mieee (which should still be the default now on Debian's
gcc), if I build with -O2, I get 2.65249e-315 printed out twice. If I build
with -O0 I instead get
Building with gcc-4.1 makes things worse, not better, as the second value is
always returned as a zero then regardless of optimization.
I've tested this on an ev56 with a 2.6.24 kernel, and an ev68 with a 2.6.18
kernel. (Both had CONFIG_MATHEMU=y.)
Beyond that, I haven't looked closely at the math you're doing to verify
that the alpha is getting it wrong, but I can confirm that this problem is
consistently reproducible and isn't tied to math-emu.
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/