projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2003-04-10 15:46:11 by simonpj]
[ghc-hetmet.git]
/
ghc
/
includes
/
CCall.h
diff --git
a/ghc/includes/CCall.h
b/ghc/includes/CCall.h
index
8ad6499
..
3040c17
100644
(file)
--- a/
ghc/includes/CCall.h
+++ b/
ghc/includes/CCall.h
@@
-1,7
+1,10
@@
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: CCall.h,v 1.2 1998/12/02 13:20:53 simonm Exp $
+ * $Id: CCall.h,v 1.4 2000/01/13 14:34:00 hwloidl Exp $
+ *
+ * (c) The GHC Team, 1998-1999
*
* Macros for performing C calls from the STG world.
*
* Macros for performing C calls from the STG world.
+ *
* -------------------------------------------------------------------------- */
#ifndef CCALL_H
* -------------------------------------------------------------------------- */
#ifndef CCALL_H
@@
-52,6
+55,9
@@
#define STGCALL5(f,a,b,c,d,e) \
CALLER_SAVE_ALL (void) f(a,b,c,d,e); CALLER_RESTORE_ALL
#define STGCALL5(f,a,b,c,d,e) \
CALLER_SAVE_ALL (void) f(a,b,c,d,e); CALLER_RESTORE_ALL
+#define STGCALL6(f,a,b,c,d,e,z) \
+ CALLER_SAVE_ALL (void) f(a,b,c,d,e,z); CALLER_RESTORE_ALL
+
#define RET_STGCALL0(t,f) \
({ t _r; CALLER_SAVE_ALL _r = f(); CALLER_RESTORE_ALL; _r; })
#define RET_STGCALL0(t,f) \
({ t _r; CALLER_SAVE_ALL _r = f(); CALLER_RESTORE_ALL; _r; })
@@
-71,6
+77,9
@@
#define RET_STGCALL5(t,f,a,b,c,d,e) \
({ t _r; CALLER_SAVE_ALL _r = f(a,b,c,d,e); CALLER_RESTORE_ALL; _r; })
#define RET_STGCALL5(t,f,a,b,c,d,e) \
({ t _r; CALLER_SAVE_ALL _r = f(a,b,c,d,e); CALLER_RESTORE_ALL; _r; })
+#define RET_STGCALL6(t,f,a,b,c,d,e,z) \
+ ({ t _r; CALLER_SAVE_ALL _r = f(a,b,c,d,e,z); CALLER_RESTORE_ALL; _r; })
+
/*
* A PRIM_STGCALL is used when we have arranged to save the R<n>,
/*
* A PRIM_STGCALL is used when we have arranged to save the R<n>,
@@
-98,6
+107,9
@@
#define PRIM_STGCALL5(f,a,b,c,d,e) \
CALLER_SAVE_SYSTEM (void) f(a,b,c,d,e); CALLER_RESTORE_SYSTEM
#define PRIM_STGCALL5(f,a,b,c,d,e) \
CALLER_SAVE_SYSTEM (void) f(a,b,c,d,e); CALLER_RESTORE_SYSTEM
+#define PRIM_STGCALL6(f,a,b,c,d,e,z) \
+ CALLER_SAVE_SYSTEM (void) f(a,b,c,d,e,z); CALLER_RESTORE_SYSTEM
+
#define RET_PRIM_STGCALL0(t,f) \
({ t _r; CALLER_SAVE_SYSTEM _r = f(); CALLER_RESTORE_SYSTEM; _r; })
#define RET_PRIM_STGCALL0(t,f) \
({ t _r; CALLER_SAVE_SYSTEM _r = f(); CALLER_RESTORE_SYSTEM; _r; })
@@
-117,6
+129,9
@@
#define RET_PRIM_STGCALL5(t,f,a,b,c,d,e) \
({ t _r; CALLER_SAVE_SYSTEM _r = f(a,b,c,d,e); CALLER_RESTORE_SYSTEM; _r; })
#define RET_PRIM_STGCALL5(t,f,a,b,c,d,e) \
({ t _r; CALLER_SAVE_SYSTEM _r = f(a,b,c,d,e); CALLER_RESTORE_SYSTEM; _r; })
+#define RET_PRIM_STGCALL6(t,f,a,b,c,d,e,z) \
+ ({ t _r; CALLER_SAVE_SYSTEM _r = f(a,b,c,d,e,z); CALLER_RESTORE_SYSTEM; _r; })
+
/* ToDo: ccalls that might garbage collect - do we need to return to
* the scheduler to perform these? Similarly, ccalls that might want
* to call Haskell right back, or start a new thread or something.
/* ToDo: ccalls that might garbage collect - do we need to return to
* the scheduler to perform these? Similarly, ccalls that might want
* to call Haskell right back, or start a new thread or something.