GDC/ARM: Help needed: Porting std.math.internal.gammafunction

Johannes Pfau via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 3 09:37:26 PDT 2014


Am Thu, 03 Jul 2014 18:09:41 +0200
schrieb dennis luehring <dl.soluz at gmx.net>:

> OT question:
> 
> can you also check big endian behavior with your ARM system
> (and maybe maybe unaligned accesses) if possible -
I sometimes test on an armv5te as unaligned accesses corrupt data on
these systems. I found one or two alignment bugs in druntime, but
those have been fixed. I'll probably run the next test run with
http://www.mjmwired.net/kernel/Documentation/arm/mem_alignment
enabled. 

> i think ARM can be configure for beeing big endian (and 
> unaligned-unware) - or?

ARM cores can in theory run in big endian mode but it's hard to find
detailed information. From http://www.arium.com/pdf/Endianness.pdf
-----------------
The ARM Architectural Reference Manual states that ARM processors are
bi-endian, meaning they can operate in either little-endian or
big-endian modes. The ARM processor does not have any instructions or
features that affect endianness. The endianness of the system as a
whole is determined by the circuitry that connects the processor to its
peripheral devices.

In those ARM cores that contain a System Control
coprocessor (coprocessor 15), Control Register 1 contains a bit that
can be used to reverse the endian configuration of the system. The
overall design of the system may require that this bit be set for
proper operation. Check the user’s manual for the board to determine
the proper setting for this bit.

Since this bit is cleared at reset,
the software engineer still must ensure that any code that executes
either directly from flash or immediately after reset is formatted for
the correct endian configuration, and the reset handler code must set
this bit if required.

For those ARM cores that do not include
coprocessor 15, the software engineer has no control over the endian
configuration of the system.
-----------------

So whether a SOC can actually run in big endian mode depends not only
on the ARM core but also on the specific SOC. And it's often hard to
find documentation for SOCs. I also don't know of any ARM big endian
linux distribution.



More information about the Digitalmars-d mailing list