X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FCCall.h;h=3040c174916550e3b18bde611dea064c9175fa84;hb=8e73d8eaba99de6ccc36c842dd1a9cb35f5fcea0;hp=8ad6499df674cb2cc9f1c91bc63c489b8dba86e7;hpb=438596897ebbe25a07e1c82085cfbc5bdb00f09e;p=ghc-hetmet.git diff --git a/ghc/includes/CCall.h b/ghc/includes/CCall.h index 8ad6499..3040c17 100644 --- 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. + * * -------------------------------------------------------------------------- */ #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 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; }) @@ -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_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, @@ -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_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; }) @@ -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_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.