projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2001-08-15 14:02:54 by sewardj]
[ghc-hetmet.git]
/
ghc
/
rts
/
ForeignCall.c
diff --git
a/ghc/rts/ForeignCall.c
b/ghc/rts/ForeignCall.c
index
182853e
..
7dc5661
100644
(file)
--- a/
ghc/rts/ForeignCall.c
+++ b/
ghc/rts/ForeignCall.c
@@
-1,6
+1,6
@@
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: ForeignCall.c,v 1.13 2000/03/02 10:32:17 sewardj Exp $
+ * $Id: ForeignCall.c,v 1.19 2000/10/09 10:28:33 daan Exp $
*
* (c) The GHC Team 1994-1999.
*
*
* (c) The GHC Team 1994-1999.
*
@@
-178,7
+178,7
@@
static void universal_call_c_generic
unsigned int *p = (unsigned int*) args;
#define ARG(n) (p[n*2])
unsigned int *p = (unsigned int*) args;
#define ARG(n) (p[n*2])
-#define CMP(str) ((n_args + 1 == strlen(str)) && \
+#define CMP(str) ((n_args + 1 == (int)strlen(str)) && \
(!strncmp(str,argstr,n_args + 1)))
#define CALL(retType,callTypes,callVals) \
(!strncmp(str,argstr,n_args + 1)))
#define CALL(retType,callTypes,callVals) \
@@
-205,7
+205,8
@@
static void universal_call_c_generic
printf("%c",(char)argstr[i]);
}
printf("' [%d arg(s)]\n",n_args);
printf("%c",(char)argstr[i]);
}
printf("' [%d arg(s)]\n",n_args);
- assert(0);
+ barf("aborting");
+ ASSERT(0);
}
#undef CALL
#undef CMP
}
#undef CALL
#undef CMP
@@
-248,7
+249,7
@@
int ccall ( CFunDescriptor* d,
return 1; /* unlikely, but ... */
p = (unsigned int*) &arg_vec[1];
return 1; /* unlikely, but ... */
p = (unsigned int*) &arg_vec[1];
- for (i = 0; i < d->num_args; i++) {
+ for (i = 0; i < (int)(d->num_args); i++) {
switch (d->arg_tys[i]) {
case INT_REP:
switch (d->arg_tys[i]) {
case INT_REP:
@@
-316,7
+317,6
@@
int ccall ( CFunDescriptor* d,
PushPtr((StgPtr)(*bco));
cap->rCurrentTSO->sp = MainRegTable.rSp;
cap->rCurrentTSO->su = MainRegTable.rSu;
PushPtr((StgPtr)(*bco));
cap->rCurrentTSO->sp = MainRegTable.rSp;
cap->rCurrentTSO->su = MainRegTable.rSu;
- cap->rCurrentTSO->splim = MainRegTable.rSpLim;
token = suspendThread(cap);
#if i386_TARGET_ARCH
token = suspendThread(cap);
#if i386_TARGET_ARCH
@@
-335,7
+335,6
@@
int ccall ( CFunDescriptor* d,
cap = resumeThread(token);
MainRegTable.rSp = cap->rCurrentTSO->sp;
MainRegTable.rSu = cap->rCurrentTSO->su;
cap = resumeThread(token);
MainRegTable.rSp = cap->rCurrentTSO->sp;
MainRegTable.rSu = cap->rCurrentTSO->su;
- MainRegTable.rSpLim = cap->rCurrentTSO->splim;
*bco=(StgBCO*)PopPtr();
/* INT, WORD, ADDR, STABLE don't need to do a word-size check
*bco=(StgBCO*)PopPtr();
/* INT, WORD, ADDR, STABLE don't need to do a word-size check
@@
-385,7
+384,7
@@
int ccall ( CFunDescriptor* d,
/* Make it possible for the evaluator to get hold of bytecode
for a given function by name. Useful but a hack. Sigh.
*/
/* Make it possible for the evaluator to get hold of bytecode
for a given function by name. Useful but a hack. Sigh.
*/
-extern void* getHugs_AsmObject_for ( char* s );
+extern void* /* StgClosure* */ getHugs_BCO_cptr_for ( char* s );
extern int /*Bool*/ combined;
/* ----------------------------------------------------------------*
extern int /*Bool*/ combined;
/* ----------------------------------------------------------------*
@@
-430,7
+429,7
@@
unpackArgsAndCallHaskell_x86_nocallconv_wrk ( StgStablePtr stableptr,
while (*argp) {
switch (*argp) {
case CHAR_REP:
while (*argp) {
switch (*argp) {
case CHAR_REP:
- node = rts_apply ( node, rts_mkChar ( *(char*)args ) );
+ node = rts_apply ( node, rts_mkChar ( *(unsigned int*)args ) );
args += 4;
break;
case INT_REP:
args += 4;
break;
case INT_REP:
@@
-469,7
+468,7
@@
unpackArgsAndCallHaskell_x86_nocallconv_wrk ( StgStablePtr stableptr,
sstat = rts_evalIO ( node, &nodeOut );
} else {
node = rts_apply (
sstat = rts_evalIO ( node, &nodeOut );
} else {
node = rts_apply (
- asmClosureOfObject(getHugs_AsmObject_for("primRunST")),
+ getHugs_BCO_cptr_for("runST"),
node );
sstat = rts_eval ( node, &nodeOut );
}
node );
sstat = rts_eval ( node, &nodeOut );
}
@@
-686,7
+685,7
@@
StgAddr createAdjThunk ( StgStablePtr stableptr,
createAdjThunk_x86 ( stableptr, typestr, callconv );
#else
0;
createAdjThunk_x86 ( stableptr, typestr, callconv );
#else
0;
- #warn foreign export not implemented on this architecture
+#warning foreign export not implemented on this architecture
#endif
}
#endif
}