[erlang-patches] Float endianness in 15B

Lukas Larsson <>
Tue Jul 17 12:08:08 CEST 2012


Aha, so that is the way it works. Then I think we'll have to accept the 
current solution until someones google skills are better than mine and 
find a compile time way to do this.

Thanks for the testcase! I'll let it run a night in our testbench and 
then I'll merge it to be released with R15B02!

Lukas


On 17/07/12 10:14, Michael Sperber wrote:
> Lukas Larsson <> writes:
>
>> Sorry for the long delay, we just now got our ARM machines
>> working. Unfortunately it does not seem to use PDP endian floats. So I
>> hope that it is ok with you to do some more work on your end.
> Of course.  Thanks for looking into this!
>
>> Does the compiler you use set __BYTE_ORDER to __PDP_ENDIAN in
>> endian.h?
> No, it's __LITTLE_ENDIAN.  And that's the correct setting for integers.
> The problem is that the information from endian.h is not enough to
> determine float endianness.
>
>> If so could you update the ac function to check that first?
>> If we can rely on the define it will make the check work better when
>> cross compiling.
> Good point.  (Especially as we used to cross-compile before switching to
> building under qemu.)  I'm afraid I don't know a good solution.  Maybe
> we do need to look at the architecture name after all.  I'd be happy to
> code up an alternative if we can agree on the direction.
>
>> Also it would be great to have a testcase for this, would you mind a
>> small testcase to erts/emulator/test/float_SUITE.erl ?
> Good point.  I believe the floating-point test suite didn't pass the
> existing tests, but of course that was coincidental.  Here's the test
> suite:
>
> https://github.com/mikesperber/otp/commit/cab9edd0a6f1fad2c3ec9661b39627756ad9d2ba
>
> Please let me if there's anything else I can do to move this along.
>




More information about the erlang-patches mailing list