This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fortran/PR19303 PATCH: Runtime selection of record markers forunformatted sequential io


(adding Steve Ellcey to CC. Can you point us to some documentation of HP's
record format?)

Janne Blomqvist wrote:
> - Support for HP format (see
> http://gcc.gnu.org/ml/fortran/2004-12/msg00142.html ) is not
> implemented completely nor correctly, since I can't figure out how it
> is supposed to work at all without very poor performance (see comments
> in source).

I wonder if this format is documented someplace.  The only documenation I
could find clearly states something different from what Steve said:

From
<http://h18009.www1.hp.com/fortran/docs/vms-um/dfumio.htm#vms_sec_record_types>
--------------
Variable-length records can contain any number of bytes, up to a specified
maximum. These records are prefixed by a count field, indicating the number of
bytes in the record. The count field comprises two bytes on a disk device and
four bytes on magnetic tape. The value stored in the count field indicates the
number of data bytes in the record.
--------------

That aside I would also be surprised if HP actually set the whole 32 bits to 1
instead of simply setting the sign-bit and indicating that this is 64 bit
record that way (i.e. if (reclen && 0x80000000 == 0) length = reclen; else
length = (reclen && 0x7FFFFFFF) << 32 + the_32_bits_following_reclen;) , but
without documentation or a HP compiler to try out, this is of course idle
speculation, and it wouldn't solve your performance problem wither :-(

- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]