summaryrefslogtreecommitdiff
path: root/rts/StgPrimFloat.c
diff options
context:
space:
mode:
authorKarel Gardas <karel.gardas@centrum.cz>2015-03-22 21:58:03 +0100
committerKarel Gardas <karel.gardas@centrum.cz>2015-03-22 22:09:05 +0100
commit12a03c44c006f142f93980e0dbdfab0f73db042c (patch)
treee7d51466456a6c80898686e3f23467dab1745c5f /rts/StgPrimFloat.c
parente25ad0424019e9727a49a88ebea0092fdf17b467 (diff)
downloadhaskell-12a03c44c006f142f93980e0dbdfab0f73db042c.tar.gz
fix bus error (misaligned data access) on SPARC in __decodeDouble_Int64
Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D749
Diffstat (limited to 'rts/StgPrimFloat.c')
-rw-r--r--rts/StgPrimFloat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/StgPrimFloat.c b/rts/StgPrimFloat.c
index e2eeee5c92..277ae66af5 100644
--- a/rts/StgPrimFloat.c
+++ b/rts/StgPrimFloat.c
@@ -182,9 +182,9 @@ __decodeDouble_Int64 (StgInt64 *const mantissa, const StgDouble dbl)
I_ exp = 0;
__decodeDouble_2Int (&man_sign, &man_high, &man_low, &exp, dbl);
-
- *mantissa = ((((StgInt64)man_high << 32) | (StgInt64)man_low)
- * (StgInt64)man_sign);
+ ASSIGN_Int64((W_*)mantissa, ((((StgInt64)man_high << 32)
+ | (StgInt64)man_low)
+ * (StgInt64)man_sign));
return exp;
#endif
}