20 lines
1.2 KiB
Diff
20 lines
1.2 KiB
Diff
diff -up mono-4.0.2/mono/metadata/decimal-ms.c.than mono-4.0.2/mono/metadata/decimal-ms.c
|
|
--- mono-4.0.2/mono/metadata/decimal-ms.c.than 2015-07-06 08:21:27.524461795 -0400
|
|
+++ mono-4.0.2/mono/metadata/decimal-ms.c 2015-07-06 08:30:26.954461795 -0400
|
|
@@ -55,8 +55,13 @@ static const uint32_t ten_to_ten_div_4 =
|
|
#define DECIMAL_LO32(dec) ((dec).v.v.Lo32)
|
|
#define DECIMAL_MID32(dec) ((dec).v.v.Mid32)
|
|
#define DECIMAL_HI32(dec) ((dec).Hi32)
|
|
-#define DECIMAL_LO64_GET(dec) ((dec).v.Lo64)
|
|
-#define DECIMAL_LO64_SET(dec,value) {(dec).v.Lo64 = value; }
|
|
+#if G_BYTE_ORDER != G_LITTLE_ENDIAN
|
|
+# define DECIMAL_LO64_GET(dec) (((uint64_t)((dec).v.v.Mid32) << 32) | (dec).v.v.Lo32)
|
|
+# define DECIMAL_LO64_SET(dec,value) {(dec).v.v.Lo32 = (value); (dec).v.v.Mid32 = ((value) >> 32); }
|
|
+#else
|
|
+# define DECIMAL_LO64_GET(dec) ((dec).v.Lo64)
|
|
+# define DECIMAL_LO64_SET(dec,value) {(dec).v.Lo64 = value; }
|
|
+#endif
|
|
|
|
#define DECIMAL_SETZERO(dec) {DECIMAL_LO32(dec) = 0; DECIMAL_MID32(dec) = 0; DECIMAL_HI32(dec) = 0; DECIMAL_SIGNSCALE(dec) = 0;}
|
|
#define COPYDEC(dest, src) {DECIMAL_SIGNSCALE(dest) = DECIMAL_SIGNSCALE(src); DECIMAL_HI32(dest) = DECIMAL_HI32(src); \
|