In my previous email to this mailing list I claimed that the DATA
statement is translated incorrectly. In fact it is not the data statement
but the hexadecimal and octal constants of the form O'123' of Z'afb' which
are interpreted wrongly if they are assigned to INTEGER*8 variables.
This bug has a drawback to the FFIO library. The routine IA2MIPS (which
should do the little to big-endian translation) doesn't work because of
the wrongly initialized arrays NSIZE and FSIZE (in BLOCK DATA
IA2MIPS_INIT in file libu/ieg/ia2mips.F).
As a matter of fact the routine ia2mips was not registered in the list of
allowed numerical conversions with the FFIO library, I guess the reason
was the failure generated by the wrong interpretation of octal
constants.
To make it short: if anybody wants byte-swapping he should do the
following:
1: replace the contents of BLOCK DATA IA2MIPS_INIT in libu/ieg/ia2mips.F
by
data nsize /
1 2147516555,
2 139,
3 32904,
4 2147516544,
5 139,
6 1/
data fsize /
1 2147516555,
2 139,
3 32904,
4 2147516544,
5 139,
6 1/
2: replace the line
{ mips2ia_, _conv_err, 1, 0, 0 }, /* NCV_MIPS */
by
{ mips2ia_, ia2mips_, 1, 0, 0 }, /* NCV_MIPS */
in the file libu/util/fsztab.c
3: recompile libffio
Best regards,
Erich Focht
---
Dr. Erich Focht <efocht@xxxxxxxxxx>
NEC European Supercomputer Systems, European HPC Technology Center
Hessbruehlstr. 21B, 70565 Stuttgart, Germany
phone: +49-711-78055-15 fax : +49-711-78055-25
|