bit conversion, not a numerical conversion.
svn path=/trunk/mcs/; revision=14791
+2003-05-21 Jackson Harper <jackson@latitudegeo.com>
+
+ * ILParser.jay: When converting from int32 to int64 do an exact
+ bit conversion, not a numerical conversion.
+
2003-05-21 Jackson Harper <jackson@latitudegeo.com>
* ILParser.jay: INT_I8s are not int instructions, currently the
int32 : INT32\r
| INT64\r
{\r
- Int64 int64 = (Int64) $1;\r
-\r
- if (int64 > Int32.MaxValue)\r
- $$ = Int32.MaxValue;\r
- else if (int64 < Int32.MinValue)\r
- $$ = Int32.MinValue;\r
+ long l = (long) $1;\r
+ byte[] intb = BitConverter.GetBytes (l);\r
+ $$ = BitConverter.ToInt32 (intb, 0);\r
}\r
;\r
\r