[apt4ssx8] Re: Compiling apt360 with g77

  • From: Jon Elson <elson@xxxxxxxxxxxxxxxx>
  • To: apt4ssx8@xxxxxxxxxxxxx
  • Date: Wed, 27 Jun 2012 20:21:37 -0500

Brent Muller wrote:
On 6/27/2012 10:54 AM, Jon Elson wrote:
Brent Muller wrote:

There are two things that come to mind when porting: one, what would be the affect of running code made for big-endian machines on intel?
Properly written pure Fortran code should be very unlikely to suffer problems with this. You could certainly run into issues with assembler routines, or in places where several byte variables are commoned to a wider variable. Otherwise, the byte order

I think this problem, where smaller byte variables are commoned into a wider variable, was precisely the problem.
Yup, a typical thing to do, especially in the old days, and its sure to cause problems when the endian-ness is changed. If possible, the code that needs these sorts of conversions should be looked at to see if there is an endian-independent way to do this. Assembling bytes into a variable (CPU register) should be correct for any
endianness of the memory architecture.

Jon

Other related posts: