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
4f2b3ca6
Commit
4f2b3ca6
authored
May 10, 1999
by
simonm
Browse files
[project @ 1999-05-10 09:50:49 by simonm]
integer2Int# take 4: cleaned up a little.
parent
94e0fc0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/includes/PrimOps.h
View file @
4f2b3ca6
/* -----------------------------------------------------------------------------
* $Id: PrimOps.h,v 1.
29
1999/05/10 09:
26
:4
1
s
of
Exp $
* $Id: PrimOps.h,v 1.
30
1999/05/10 09:
50
:4
9
s
imonm
Exp $
*
* (c) The GHC Team, 1998-1999
*
...
...
@@ -307,19 +307,16 @@ typedef union {
* integer2Int# is now modular.
*/
#define integer2Intzh(r, sa,da) \
{ MP_INT arg; \
\
arg._mp_size = (sa); \
arg._mp_alloc = ((StgArrWords *)da)->words; \
arg._mp_d = (unsigned long int *) (BYTE_ARR_CTS(da)); \
\
(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 integer2Intzh(r, sa,da) \
{ StgWord word0 = ((StgWord *)BYTE_ARR_CTS(da))[0]; \
int size = sa; \
\
(r) = \
( size == 0 ) ? \
0 : \
( size < 0 && word0 != 0x8000000 ) ? \
-(I_)word0 : \
(I_)word0; \
}
#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