Commit 372a8212 authored by Ian Lynagh's avatar Ian Lynagh

Fix int64ToInteger 0xFFFFFFFF00000000 on 32bit machine; trac #2223

Patch from Mike Gunter.
parent 6821c8a4
......@@ -452,11 +452,11 @@ int64ToIntegerzh_fast
hi = TO_W_(val >> 32);
lo = TO_W_(val);
if ( hi != 0 && hi != 0xFFFFFFFF ) {
words_needed = 2;
} else {
if ( hi == 0 || (hi == 0xFFFFFFFF && lo != 0) ) {
// minimum is one word
words_needed = 1;
} else {
words_needed = 2;
}
ALLOC_PRIM( SIZEOF_StgArrWords + WDS(words_needed),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment