Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
9f093c85
Commit
9f093c85
authored
May 07, 1999
by
sof
Browse files
[project @ 1999-05-07 15:42:49 by sof]
integer2Int# again: don't flip sign unless outside [minInt,maxInt]
parent
23dbc7c8
Changes
1
Show whitespace changes
Inline
Side-by-side
ghc/includes/PrimOps.h
View file @
9f093c85
/* -----------------------------------------------------------------------------
* $Id: PrimOps.h,v 1.2
7
1999/05/0
4 08:58:18
sof Exp $
* $Id: PrimOps.h,v 1.2
8
1999/05/0
7 15:42:49
sof Exp $
*
* (c) The GHC Team, 1998-1999
*
...
...
@@ -303,6 +303,8 @@ typedef union {
/* We can do integer2Int and cmpInteger inline, since they don't need
* to allocate any memory.
*
* integer2Int# is now modular.
*/
#define integer2Intzh(r, sa,da) \
...
...
@@ -312,7 +314,12 @@ typedef union {
arg._mp_alloc = ((StgArrWords *)da)->words; \
arg._mp_d = (unsigned long int *) (BYTE_ARR_CTS(da)); \
\
(r) = RET_PRIM_STGCALL1(I_,mpz_get_ui,&arg); \
(r) = \
( arg._mp_size == 0 ) ? \
0 : \
( arg._mp_size < 0 && arg._mp_d[0] > 0x80000000 ) ? \
-(I_)arg._mp_d[0] : \
(I_)arg._mp_d[0]; \
}
#define integer2Wordzh(r, sa,da) \
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment