[pypy-dev] [pypy-commit] pypy default: (arigo, bivab) implement longlong2float and float2longlong in a way that is more close to the C standard. On ARM/32bit this code was causing a reodering of instructions that filled one of the two words with

Armin Rigo arigo at tunes.org
Tue Jun 7 15:38:22 CEST 2011

Hi Anto,

On Mon, Jun 6, 2011 at 8:58 PM, Antonio Cuni <anto.cuni at gmail.com> wrote:
> speaking of portability, what about using sizeof(double)/sizeof(char) instead
> of hardcoding 8?

That change was not about portability, but about C compilers getting
too clever at optimizing.  These two functions are (supposed) to be
only used on machines with 8-byte long longs and doubles.  I could add
an assert, checking that sizeof(double) == sizeof(long long) == 8.


More information about the pypy-dev mailing list