Re: [cp-patches] RFC: arm doubleToLongBits fix

2006-01-26 Thread Archie Cobbs

Christian Thalinger wrote:

+#if defined(__IEEE_BYTES_LITTLE_ENDIAN)
+  /* On little endian ARM processors when using FPA, word order of
+ doubles is still big endian. So take that into account here. When
+ using VFP, word order of doubles follows byte order. */
+
+#define SWAP_DOUBLE(a)(((a)  32) | (((a)  32)  0x))
+
+  val.j = SWAP_DOUBLE(val.j);
+#endif
+


Could instead you just have a configure test for byte order?
Not sure if __IEEE_BYTES_LITTLE_ENDIAN is going to cover all
possible cases.

Of course, since you've got a patch and I don't feel free
to ignore me :-)

-Archie

__
Archie Cobbs  *CTO, Awarix*  http://www.awarix.com



Re: [cp-patches] FYI: ObjectView implemented

2006-01-26 Thread Archie Cobbs

Roman Kennke wrote:

Sorry, this was an accident with cvs add/ cvs diff. Now I attached the
new file.


FYI, cvs diff -uN (note the -N) includes added files in the diff
(it took me a while to realize this).

-Archie

__
Archie Cobbs  *CTO, Awarix*  http://www.awarix.com



Re: [cp-patches] RFC: arm doubleToLongBits fix

2006-01-26 Thread Christian Thalinger
On Thu, Jan 26, 2006 at 08:17:53AM -0600, Archie Cobbs wrote:
 Could instead you just have a configure test for byte order?
 Not sure if __IEEE_BYTES_LITTLE_ENDIAN is going to cover all
 possible cases.
 
 Of course, since you've got a patch and I don't feel free
 to ignore me :-)

Originally the patch checked for

#if defined(__arm__)  !defined(__VFP_FP__)

But __IEEE_BYTES_LITTLE_ENDIAN is exactly defined when this two things
are true.  And other architectures are not affected AFAIK.

TWISTI



Re: [cp-patches] RFC: arm doubleToLongBits fix

2006-01-26 Thread Tom Tromey
 Twisti == Christian Thalinger [EMAIL PROTECTED] writes:

Twisti 2006-01-26  Christian Thalinger  [EMAIL PROTECTED]
Twisti * native/jni/java-lang/java_lang_VMDouble.c (doubleToLongBits)
Twisti (doubleToRawLongBits, longBitsToDouble): Swap the byte
Twisti ordering for little-endian arms without VFP.

This is ok.  Thanks.

Tom