projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6821c8a
)
Fix int64ToInteger 0xFFFFFFFF00000000 on 32bit machine; trac #2223
author
Ian Lynagh
<igloo@earth.li>
Thu, 24 Apr 2008 13:15:26 +0000
(13:15 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Thu, 24 Apr 2008 13:15:26 +0000
(13:15 +0000)
Patch from Mike Gunter.
rts/PrimOps.cmm
patch
|
blob
|
history
diff --git
a/rts/PrimOps.cmm
b/rts/PrimOps.cmm
index
cbdfe67
..
6c3593e
100644
(file)
--- a/
rts/PrimOps.cmm
+++ b/
rts/PrimOps.cmm
@@
-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),