Author: miguel
Date: 2007-03-23 11:16:20 -0500 (Fri, 23 Mar 2007)
New Revision: 74887

Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/expression.cs
Log:
2007-03-23  Miguel de Icaza  <[EMAIL PROTECTED]>

        * expression.cs: On BigEndian systems, swap the bytes, temporary
        solution until we get a new bitconverter class.

Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2007-03-23 16:04:39 UTC (rev 74886)
+++ trunk/mcs/mcs/ChangeLog     2007-03-23 16:16:20 UTC (rev 74887)
@@ -1,3 +1,8 @@
+2007-03-23  Miguel de Icaza  <[EMAIL PROTECTED]>
+
+       * expression.cs: On BigEndian systems, swap the bytes, temporary
+       solution until we get a new bitconverter class.
+
 2007-03-23  Martin Baulig  <[EMAIL PROTECTED]>
 
        Fix #81158.

Modified: trunk/mcs/mcs/expression.cs
===================================================================
--- trunk/mcs/mcs/expression.cs 2007-03-23 16:04:39 UTC (rev 74886)
+++ trunk/mcs/mcs/expression.cs 2007-03-23 16:16:20 UTC (rev 74887)
@@ -5777,6 +5777,8 @@
                                                        
                                                for (int j = 0; j < factor; ++j)
                                                        data [idx + j] = 
element [j];
+                                               if 
(!BitConverter.IsLittleEndian)
+                                                       System.Array.Reverse 
(data, idx, 4);
                                        }
                                } else if (underlying_type == 
TypeManager.double_type) {
                                        if (!(v is Expression)){
@@ -5784,6 +5786,10 @@
 
                                                for (int j = 0; j < factor; ++j)
                                                        data [idx + j] = 
element [j];
+
+                                               // FIXME: Handle the ARM float 
format.
+                                               if 
(!BitConverter.IsLittleEndian)
+                                                       System.Array.Reverse 
(data, idx, 8);
                                        }
                                } else if (underlying_type == 
TypeManager.char_type){
                                        if (!(v is Expression)){

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to