Tests on ARM / Raspberry Pi

new topic     » topic index » view thread      » older message » newer message

Forked from Re: OpenEuphoria on the raspberry pi

rkdavis said...

i've just run through the t_*.e tests in the tests directory, didn't do the t_net*.e or the t_c_*.e ones but only a few failures in

t_convert.e 
t_de_dep.e 
t_de_memory.e 
t_dep.e 
t_eutest.e 
t_text.e 
t_ifdef.e 
t_include_subdir.e 
t_locale.e 
t_memory.e 
a couple seem to be the same failure so it's looking good so far

The float80_to_atom() code is something I wrote that's designed to "manually" do the conversion based on the IEEE specs:

void arm_float80_to_float64( unsigned char *a, unsigned char *b ){ 
	int64_t exp_a, exp_b, sign; 
	int64_t mantissa_a, mantissa_b; 
 
	sign  = 0x80 == (a[9] & 0x80); 
	exp_a = (a[8] | ((a[9] & 0x7f) << 8 )) - 0x3fff; // IEEE854_LONG_DOUBLE_BIAS 
	// chop off most significant bit 
	mantissa_a = 0x7fffffffffffffffLL & *((int64_t*)a); 
 
	exp_b = (exp_a + 0x3ff ); // IEEE754_DOUBLE_BIAS 
	mantissa_b = (mantissa_a >> (11)); 
 
	*((int64_t*)b) = (mantissa_b & 0x7fffffffffffffLL) | (exp_b << 52)  | (sign << 63); 
} 

I used this (instead of just using a cast) in x86 and x86-64 interpreters, and running t_convert.e, I get:

$ ../64/eui t_convert.e 
  failed: float64_to_atom #1, expected: 157.82 but got: 157.82 
  failed: float80_to_atom #1, expected: 157.82 but got: -nan 
  failed: float80_to_atom #2, expected: inf but got: 8.29768153218589e+3395 
  failed: float80_to_atom #3, expected: -inf but got: 2.49092668478425e+3396 
  failed: to_number #27, expected: {0.121,0} but got: {0.121,0} 
  98 tests run, 93 passed, 5 failed, 95% success 
 
$ ../32/eui t_convert.e 
  failed: float80_to_atom #2, expected: inf but got: 1 
  failed: float80_to_atom #3, expected: -inf but got: -1 
  94 tests run, 92 passed, 2 failed, 98% success 
 

Some of the 64-bit failures are rounding errors. The main thing seems to be recognizing infinity. Are other float80 related tests failing for ARM?

Matt

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu