On Wed, Jun 20, 2007 at 10:26:31PM +0200, Tobias Oetiker wrote: > Greetings, > > On the list for new rrdtool features there is also a new > architecture independant rrd format. I have done some research > today, and found two things. > > * XDR is probably NOT the solution > > * Rolling our own should not be all that difficult. > > I have created a little writeup on > > http://oss.oetiker.ch/rrdtool-trac/wiki/PortableRrdFormat > > I did only research x86, SPARC and PPC, if someone can fill in the > blanks on Itanium, PA-RISC and MIPS, this would be great and very > Wiki! Hi Tobi.
Nice, very nice! ;)
Filling the gaps? Yepp, here we go:
MIPS:
[EMAIL PROTECTED] $ gcc -v
Reading specs from
/usr/local/gcc-2.95.3/lib/gcc-lib/mips-sgi-irix6.5/2.95.3/specs
gcc version 2.95.3 20010315 (release)
[EMAIL PROTECTED] $ gcc -o fp fp.c
[EMAIL PROTECTED] $ ./fp
0.000000e+00 -> 00 00 00 00 00 00 00 00
1.000000e+00 -> 3f f0 00 00 00 00 00 00
-1.000000e+00 -> bf f0 00 00 00 00 00 00
nan -> 7f ff ff ff ff ff ff ff
inf -> 7f f0 00 00 00 00 00 00
-inf -> ff f0 00 00 00 00 00 00
2.000000e+00 -> 40 00 00 00 00 00 00 00
4.000000e+00 -> 40 10 00 00 00 00 00 00
8.000000e+00 -> 40 20 00 00 00 00 00 00
1.600000e+01 -> 40 30 00 00 00 00 00 00
8.642135e+130 -> 5b 1f 2b 43 c7 c0 25 2f
[EMAIL PROTECTED] $ hinv -c processor
1 300 MHZ IP30 Processor
CPU: MIPS R12000 Processor Chip Revision: 2.3
FPU: MIPS R12010 Floating Point Chip Revision: 0.0
by the way the compilation fails with the native compiler on IRIX:
[EMAIL PROTECTED] $ cc -o fp -ansi fp.c -lm
cc-1195 cc: ERROR File = fp.c, Line = 15
The indicated floating-point operation result is out of range.
0,1,-1,0.0/0.0,1.0/0.0,-1.0/0.0,2,4,8,16,8.642135E130
^
cc-1195 cc: ERROR File = fp.c, Line = 15
The indicated floating-point operation result is out of range.
0,1,-1,0.0/0.0,1.0/0.0,-1.0/0.0,2,4,8,16,8.642135E130
^
cc-1195 cc: ERROR File = fp.c, Line = 15
The indicated floating-point operation result is out of range.
0,1,-1,0.0/0.0,1.0/0.0,-1.0/0.0,2,4,8,16,8.642135E130
^
3 errors detected in the compilation of "fp.c".
PowerPC64:
[EMAIL PROTECTED] ~ $ /usr/local/gcc-3.3.4/bin/gcc -v
Reading specs from
/usr/local/gcc-3.3.4/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.4/specs
Configured with: /soft/gcc/gcc-3.3.4/gcc-3.3.4/configure
--prefix=/usr/local/gcc-3.3.4 --with-included-gettext --enable-shared
--enable-languages=c,c++,f77 -with-cpu-common --disable-multilib
Thread model: aix
gcc version 3.3.4
[EMAIL PROTECTED] ~ $ /usr/local/gcc-3.3.4/bin/gcc -o fp fp.c
[EMAIL PROTECTED] ~ $ ./fp
0.000000e+00 -> 00 00 00 00 00 00 00 00
1.000000e+00 -> 3f f0 00 00 00 00 00 00
-1.000000e+00 -> bf f0 00 00 00 00 00 00
NaNQ -> 7f f8 00 00 00 00 00 00
INF -> 7f f0 00 00 00 00 00 00
-INF -> ff f0 00 00 00 00 00 00
2.000000e+00 -> 40 00 00 00 00 00 00 00
4.000000e+00 -> 40 10 00 00 00 00 00 00
8.000000e+00 -> 40 20 00 00 00 00 00 00
1.600000e+01 -> 40 30 00 00 00 00 00 00
8.642135e+130 -> 5b 1f 2b 43 c7 c0 25 2f
[EMAIL PROTECTED] ~ $ prtconf
[... snipp ...]
Processor Type: PowerPC_POWER5
Number Of Processors: 2
Processor Clock Speed: 1648 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
[... snipp ...]
HTH,
Andreas.
--
Dipl.-Ing. Andreas Maus science+computing ag
System Administration Hagellocher Weg 73
mail: [EMAIL PROTECTED] 72070 Tuebingen, Germany
tel.: +49 7071 9457 671 www.science-computing.de
pgpHvFjq6u6U0.pgp
Description: PGP signature
_______________________________________________ rrd-developers mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
