Port-alpha archive

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

Re: Bug in libm



Hi,

I was slightly curious about this.
The implementation of lrint for alpha is very simple.
It's some boilerplate, then a call to cvttq which does
a conversion from T_floating to quadword.

Does this code trigger it?

#include <math.h>
#include <stdio.h>

int main() {
	double input = 2.34E20;
	printf("%f %ld\n", input, lrint(input));
}

I was curious how we can disable the exceptions, but
GCC says the default compilation mode should do it,
and we might need to explicitly change things to
reach another mode.
(the flag seems to be -mfp-trap-mode)

Alternatively, are you using vax float?

If you are able to, can you tell the content of
fa0, ft0, fpcr registers when receiving SIGFPE?
I believe they should hold all of the info.

Thanks.


Home | Main Index | Thread Index | Old Index