[ECOS] diag_printf("%016llx\n", ll)

Chris Morrow cmorrow@YottaYotta.com
Sun Oct 21 19:25:00 GMT 2001


Jonathan Larmour wrote:
[snip]
> This stuff was completely rewritten at the end of August. If it still
> doesn't work after updating to use that, let us know.
> 
Silly me, I forgot to do an update before checking the current
sources.

It looks like one minor mistake in the current sources. The
long long case wasn't handled correctly for unsigned numeric
values.

@@ -361,9 +361,7 @@
                     }
                 } else {
                     // Mask to unsigned, sized quantity
-		    if (islonglong) {
-			/* do nothing */
-                    } else if (islong) {
+                    if (islong) {
                         val &= ((long long)1 << (sizeof(long) * 8)) -
1;
                     } else{
                         val &= ((long long)1 << (sizeof(int) * 8)) - 1;

It would also appear that it assumes that pointers are 32 bits, but
that is a challenge for another day.

-- 
Chris Morrow	YottaYotta Inc. email: cmorrow@yottayotta.com
phone: (780) 989 6814 web:	http:  //www.yottayotta.com



More information about the Ecos-discuss mailing list