This is the mail archive of the gcc@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]

Re: big-endian for PPro


>>>>> "Ulf" == Ulf Meerwald <ulf@aero.tu-darmstadt.de> writes:

 Ulf> I need a big-endian-binary-option for the pentium Pro. I dont't
 Ulf> want to run binaries, but want to r/w the unformatted output
 Ulf> from a SGI-workstation.

It might help to know in what language.

 Ulf> I am calculating Computational Fluid Dynamics

I'll assume Fortran.

 Ulf> Is someone working on the big-endian-r/w for Pentiums,..?

Not that I know of, but it has always been on the g77 libf2c todo list
I think.  Note that this would _only_ be for g77 systems (or ones
using a completely compatible i/o library) if we're talking about
Fortran unformatted writes.  If you want to exchange binary data
between systems with different compilers you basically either go
through formatted reads and writes at either end or use a format (via
library routines) designed for this.  HDF and PDB from LLNL's (?) PACT
do the right thing; XDR (I think) and CDF don't really DTRT but would
work.

You could write special C programs straightforwardly to do the
conversion if you know the file format for whatever compiler you're
using on the SGI (if it's not g77).  The one for g77 is a known
quantity.  If you have g77 at both ends, just do byte-swapping in
Fortran on the data you read.

I hope this _was_ Fortran...


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